File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 22set -e
33
44command=" $1 "
5+
6+ # When no command is provided, attempt to read it from job.json
57if [ -z " $command " ]; then
6- echo " usage: run [update_files|update_graph]"
7- exit 1
8+ if [ -f " job.json" ]; then
9+ # Use Ruby to parse the command field; default to update_files unless explicitly graph
10+ command=$( ruby -rjson -e ' j=JSON.parse(File.read("job.json")); c=j.dig("job","command") || ""; puts(c == "graph" ? "update_graph" : "update_files")' )
11+ echo " No command argument supplied, found command '$command ' from job definition."
12+ else
13+ echo " usage: run [update_files|update_graph]"
14+ echo " Or run without arguments if a job.json file is present."
15+ exit 1
16+ fi
817fi
918
1019# ignore fetch_files command for backward compatibility
You can’t perform that action at this time.
0 commit comments