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 e727bf8 commit 4188ee1Copy full SHA for 4188ee1
agent/src/main.rs
@@ -924,9 +924,22 @@ async fn cmd_run(mut l: Level<()>) -> Result<()> {
924
925
#[tokio::main]
926
async fn main() -> Result<()> {
927
- match std::env::args().next().as_deref() {
+ let cmdname = std::env::args()
928
+ .next()
929
+ .as_deref()
930
+ .map(|s| {
931
+ let path = PathBuf::from(s);
932
+ path.file_name()
933
+ .map(|s| s.to_str())
934
+ .flatten()
935
+ .map(|s| Some(s.to_string()))
936
937
+ })
938
+ .flatten();
939
+
940
+ match cmdname.as_deref() {
941
None => bail!("could not determine executable name?"),
- Some("bmat") => {
942
+ Some(CONTROL_PROGRAM) => {
943
/*
944
* This is the in-job control entrypoint to be invoked by job
945
* programs.
0 commit comments