We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 93d731c + 3131d56 commit d056201Copy full SHA for d056201
src/lib.rs
@@ -63,6 +63,14 @@ pub use settings::{opts_with_clap, RunMode};
63
pub fn run(init: impl FnOnce(&mut VirtualMachine) + 'static) -> ExitCode {
64
env_logger::init();
65
66
+ // NOTE: This is not a WASI convention. But it will be convenient since POSIX shell always defines it.
67
+ #[cfg(target_os = "wasi")]
68
+ {
69
+ if let Ok(pwd) = env::var("PWD") {
70
+ let _ = env::set_current_dir(pwd);
71
+ };
72
+ }
73
+
74
let (settings, run_mode) = opts_with_clap();
75
76
// Be quiet if "quiet" arg is set OR stdin is not connected to a terminal
0 commit comments