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.
1 parent 9933f4e commit d86809dCopy full SHA for d86809d
casr/src/stub.rs
@@ -1,13 +1,20 @@
1
use std::env;
2
+use std::path::PathBuf;
3
use std::process::Command;
4
5
pub fn stub(subcommand: &str) {
6
// Get all command-line arguments
7
let args: Vec<String> = env::args().collect();
8
+ let casr = &args[0];
9
let args = &args[1..];
10
11
+ // Get casr path
12
+ let mut casr = PathBuf::from(casr);
13
+ casr.set_file_name("casr");
14
+ let casr = casr.to_string_lossy().into_owned();
15
+
16
// Execute casr
- let result = Command::new("casr").arg(subcommand).args(args).status();
17
+ let result = Command::new(casr).arg(subcommand).args(args).status();
18
19
// Handle execution result
20
match result {
0 commit comments