You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: core/imageroot/usr/local/bin/runagent
+21-1Lines changed: 21 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -25,9 +25,12 @@ import sys
25
25
importargparse
26
26
importagent
27
27
importpwd
28
+
importsubprocess
28
29
29
30
argp=argparse.ArgumentParser(description="Run COMMAND in the agent environment of MODULE_ID")
30
-
argp.add_argument("-m", "--module-id", help="MODULE_ID, a module identifier (e.g. \"module1\", \"node\"). Default is \"cluster\". Only root can use this flag", default="cluster")
argx.add_argument("-m", "--module-id", help="MODULE_ID, a module identifier (e.g. \"module1\", \"node\"). Default is \"cluster\". Only root can use this flag", default="cluster")
31
34
argp.add_argument("-c", "--current-dir", action="store_true", help="Run COMMAND in current directory, instead of changing directory to AGENT_STATE_DIR")
32
35
argp.add_argument('COMMAND', nargs='?', help="Command to run in the agent environment")
33
36
argp.add_argument('ARGS', nargs=argparse.REMAINDER, help="Additional arguments for COMMAND")
0 commit comments