-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement running of tools, use symlinks where possible on unix to sa…
…ve disk space
- Loading branch information
1 parent
159c495
commit ce54a4a
Showing
5 changed files
with
183 additions
and
28 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 |
---|---|---|
@@ -1,9 +1,13 @@ | ||
mod discovery; | ||
mod id_or_spec; | ||
mod prompts; | ||
mod running; | ||
mod sources; | ||
|
||
pub use self::discovery::{discover_aftman_manifest_dir, discover_aftman_manifest_dirs}; | ||
pub use self::discovery::{ | ||
discover_aftman_manifest_dir, discover_aftman_manifest_dirs, discover_closest_tool_spec, | ||
}; | ||
pub use self::id_or_spec::ToolIdOrSpec; | ||
pub use self::prompts::prompt_for_install_trust; | ||
pub use self::running::arg0_file_name; | ||
pub use self::sources::github_tool_source; |
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,16 @@ | ||
use std::{ | ||
env::{args, consts::EXE_EXTENSION}, | ||
path::PathBuf, | ||
}; | ||
|
||
pub fn arg0_file_name() -> String { | ||
let arg0 = args().next().unwrap(); | ||
let exe_path = PathBuf::from(arg0); | ||
let exe_name = exe_path | ||
.file_name() | ||
.expect("Invalid file name passed as arg0") | ||
.to_str() | ||
.expect("Non-UTF8 file name passed as arg0") | ||
.trim_end_matches(EXE_EXTENSION); | ||
exe_name.to_string() | ||
} |