Merge pull request #418 from jxy/autoext
Tests for the existence of project.nim file
This commit is contained in:
commit
35327876c0
1 changed files with 6 additions and 3 deletions
|
|
@ -498,12 +498,15 @@ proc build(options: Options) =
|
||||||
buildFromDir(pkgInfo, paths, args)
|
buildFromDir(pkgInfo, paths, args)
|
||||||
|
|
||||||
proc execBackend(options: Options) =
|
proc execBackend(options: Options) =
|
||||||
let bin = options.action.file
|
let
|
||||||
|
bin = options.action.file
|
||||||
|
binDotNim = bin.addFileExt("nim")
|
||||||
if bin == "":
|
if bin == "":
|
||||||
raise newException(NimbleError, "You need to specify a file.")
|
raise newException(NimbleError, "You need to specify a file.")
|
||||||
|
|
||||||
if not fileExists(bin):
|
if not (fileExists(bin) or fileExists(binDotNim)):
|
||||||
raise newException(NimbleError, "Specified file does not exist.")
|
raise newException(NimbleError,
|
||||||
|
"Specified file, " & bin & " or " & binDotNim & ", does not exist.")
|
||||||
|
|
||||||
var pkgInfo = getPkgInfo(getCurrentDir(), options)
|
var pkgInfo = getPkgInfo(getCurrentDir(), options)
|
||||||
nimScriptHint(pkgInfo)
|
nimScriptHint(pkgInfo)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue