fix nim check nimscript [backport: 1.6] (#19444)

fix #19440; fix #3858
This commit is contained in:
flywind 2022-03-24 04:09:44 +08:00 • committed by GitHub
commit 7c3c61f2f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 1 deletions

View file

@ -1112,6 +1112,8 @@ proc processArgument*(pass: TCmdLinePass; p: OptParser;
else:
if pass == passCmd1: config.commandArgs.add p.key
if argsCount == 1:
if p.key.endsWith(".nims"):
incl(config.globalOptions, optWasNimscript)
# support UNIX style filenames everywhere for portable build scripts:
if config.projectName.len == 0:
config.projectName = unixToNativePath(p.key)