Skip to content

Commit

Permalink
Fix link command for non-terminal usage (#591)
Browse files Browse the repository at this point in the history
* Fix link command when not being used in a terminal

* format...
  • Loading branch information
Milo123459 authored Feb 4, 2025
1 parent 8a57be4 commit 175e1b6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/commands/link.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use colored::*;
use is_terminal::IsTerminal;
use std::fmt::Display;

use crate::{
Expand Down Expand Up @@ -104,8 +105,10 @@ fn select_service(
} else {
return Err(RailwayError::ServiceNotFound(service).into());
}
} else {
} else if std::io::stdout().is_terminal() {
prompt_options_skippable("Select a service <esc to skip>", useful_services)?
} else {
None
}
} else {
None
Expand Down

0 comments on commit 175e1b6

Please sign in to comment.