On Mon, Oct 19, 2020 at 06:53:42PM +0800, Wei Jihui wrote:
if get string named with *.yaml from ARGV, treat it as job yaml. even it is without directory. and find_jobfile check whether the job yaml exists.
Signed-off-by: Wei Jihui weijihuiall@163.com
sbin/submit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sbin/submit b/sbin/submit index 831bfb5a..979e3dca 100755 --- a/sbin/submit +++ b/sbin/submit @@ -60,7 +60,7 @@ options.parse!(ARGV)
find_job_yaml = false ARGV.delete_if do |arg|
- find_job_yaml = true if File.file?(arg)
- find_job_yaml = true if arg =~ /.yaml$/
I think the flag find_job_yaml should be determined by the following function: find_jobfile
if not find_jobfile, there is no need to merge key_value to hash.
if submit key=value .yaml ==> the find_job_yaml become true, but the code doesn't have to go any further.
if arg.index '=' if find_job_yaml opt_set_key_value.merge! YAML.load arg.sub(/=/, ': ') -- 2.23.0