forked from DanielKeep/cargo-script
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added some env. vars. to be given to scripts.
Closes DanielKeep#49.
- Loading branch information
1 parent
896653e
commit a03053a
Showing
5 changed files
with
70 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
use std::env; | ||
|
||
fn main() { | ||
println!("--output--"); | ||
let path = env::var("CARGO_SCRIPT_SCRIPT_PATH").expect("CSSP wasn't set"); | ||
assert!(path.ends_with("script-cs-env.rs")); | ||
assert_eq!(env::var("CARGO_SCRIPT_SAFE_NAME"), Ok("script-cs-env".into())); | ||
assert_eq!(env::var("CARGO_SCRIPT_PKG_NAME"), Ok("script-cs-env".into())); | ||
let base_path = env::var("CARGO_SCRIPT_BASE_PATH").expect("CSBP wasn't set"); | ||
assert!(base_path.ends_with("data")); | ||
println!("Ok"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters