Skip to content

Commit 175e1b6

Browse files
authored
Fix link command for non-terminal usage (#591)
* Fix link command when not being used in a terminal * format...
1 parent 8a57be4 commit 175e1b6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/commands/link.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use colored::*;
2+
use is_terminal::IsTerminal;
23
use std::fmt::Display;
34

45
use crate::{
@@ -104,8 +105,10 @@ fn select_service(
104105
} else {
105106
return Err(RailwayError::ServiceNotFound(service).into());
106107
}
107-
} else {
108+
} else if std::io::stdout().is_terminal() {
108109
prompt_options_skippable("Select a service <esc to skip>", useful_services)?
110+
} else {
111+
None
109112
}
110113
} else {
111114
None

0 commit comments

Comments
 (0)