Tests for the existence of project.nim file
Matches nim's command line handling of 'nim c project' The error message also states the files being tested.
This commit is contained in:
parent
4992707e8b
commit
8ca1cc0957
1 changed files with 6 additions and 3 deletions
|
|
@ -498,12 +498,15 @@ proc build(options: Options) =
|
|||
buildFromDir(pkgInfo, paths, args)
|
||||
|
||||
proc execBackend(options: Options) =
|
||||
let bin = options.action.file
|
||||
let
|
||||
bin = options.action.file
|
||||
binDotNim = bin.addFileExt("nim")
|
||||
if bin == "":
|
||||
raise newException(NimbleError, "You need to specify a file.")
|
||||
|
||||
if not fileExists(bin):
|
||||
raise newException(NimbleError, "Specified file does not exist.")
|
||||
if not (fileExists(bin) or fileExists(binDotNim)):
|
||||
raise newException(NimbleError,
|
||||
"Specified file, " & bin & " or " & binDotNim & ", does not exist.")
|
||||
|
||||
var pkgInfo = getPkgInfo(getCurrentDir(), options)
|
||||
nimScriptHint(pkgInfo)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue