Skip to content

Commit

Permalink
Add flag to allow skipping of the validation during nimble develop (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
yyoncho authored Jun 26, 2023
1 parent 158c667 commit 16fa227
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/nimblepkg/developfile.nim
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ proc addDevelopPackage(data: var DevelopFileData, path: Path,
## in the develop file or some of its includes.

let (pkgInfo, error) = validatePackage(path, options)
if error != nil:
if error != nil and not options.action.skipValidation:
displayError(invalidPkgMsg($path))
displayDetails(error)
return false
Expand Down
4 changes: 4 additions & 0 deletions src/nimblepkg/options.nim
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ type
devActions*: seq[DevelopAction]
path*: string
noRebuild*: bool
skipValidation*: bool
withDependencies*: bool
## Whether to put in develop mode also the dependencies of the packages
## listed in the develop command.
Expand Down Expand Up @@ -152,6 +153,7 @@ Commands:
able to use global develop mode packages.
Nimble uses it as a global develop file if a
local one does not exist.
[--skipValidation] Skip validation of the package structure.
check Verifies the validity of a package in the
current working directory.
init [pkgname] Initializes a new Nimble project in the
Expand Down Expand Up @@ -612,6 +614,8 @@ proc parseFlag*(flag, val: string, result: var Options, kind = cmdLongOption) =
raise nimbleError(multiplePathOptionsGivenMsg)
of "withdependencies":
result.action.withDependencies = true
of "skipvalidation":
result.action.skipValidation = true
of "g", "global":
result.action.global = true
of "developfile":
Expand Down

0 comments on commit 16fa227

Please sign in to comment.