feat(muse-cli): streamlined account argument handling and extracted clean inner invocation wrapper
This commit is contained in:
+1
-12
@@ -14,18 +14,7 @@ mkdir -p "$CONF_DIR"
|
||||
|
||||
run_cli() {
|
||||
export MUSE_CONFIG_DIR="$CONF_DIR"
|
||||
"$NETVM_BIN/netvm-exec.sh" "$NODE" -- python3 -c "
|
||||
import os, sys
|
||||
os.environ['MUSE_CONFIG_DIR'] = '$CONF_DIR'
|
||||
import muse_cli.cli as cli
|
||||
cli.CONFIG_DIR = '$CONF_DIR'
|
||||
cli.CONFIG_FILE = os.path.join('$CONF_DIR', 'config.json')
|
||||
cli.COOKIES_FILE = os.path.join('$CONF_DIR', 'cookies.txt')
|
||||
try:
|
||||
cli.main()
|
||||
except SystemExit as e:
|
||||
sys.exit(e.code)
|
||||
" "$@"
|
||||
"$NETVM_BIN/netvm-exec.sh" "$NODE" -- python3 "$NETVM_BIN/muse-cli-inner.py" "$NODE" "$@"
|
||||
}
|
||||
|
||||
# First attempt
|
||||
|
||||
Reference in New Issue
Block a user