mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Prevent roc format from reading $PWD when --stdin or --stdout options given
This commit is contained in:
parent
8e0e48e0bb
commit
390808eb12
2 changed files with 3 additions and 1 deletions
|
@ -266,7 +266,7 @@ pub fn build_app() -> Command {
|
|||
.arg(args_for_app.clone().last(true))
|
||||
)
|
||||
.subcommand(Command::new(CMD_FORMAT)
|
||||
.about("Format a .roc file using standard Roc formatting")
|
||||
.about("Format a .roc file or the .roc files contained in a directory using standard\nRoc formatting")
|
||||
.arg(
|
||||
Arg::new(DIRECTORY_OR_FILES)
|
||||
.index(1)
|
||||
|
@ -294,6 +294,7 @@ pub fn build_app() -> Command {
|
|||
.action(ArgAction::SetTrue)
|
||||
.required(false),
|
||||
)
|
||||
.after_help("If DIRECTORY_OR_FILES is omitted, the .roc files in the current working\ndirectory are formatted.")
|
||||
)
|
||||
.subcommand(Command::new(CMD_VERSION)
|
||||
.about(concatcp!("Print the Roc compiler’s version, which is currently ", VERSION)))
|
||||
|
|
|
@ -287,6 +287,7 @@ fn main() -> io::Result<()> {
|
|||
values.push(os_string.to_owned());
|
||||
}
|
||||
}
|
||||
None if from_stdin || to_stdout => {}
|
||||
None => {
|
||||
let mut os_string_values: Vec<OsString> = Vec::new();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue