diff --git a/src/nimblepkg/nimscriptwrapper.nim b/src/nimblepkg/nimscriptwrapper.nim index 575e4ec8..2450c88f 100644 --- a/src/nimblepkg/nimscriptwrapper.nim +++ b/src/nimblepkg/nimscriptwrapper.nim @@ -108,7 +108,7 @@ proc getNimsFile(scriptName: string, options: Options): string = import system except getCommand, setCommand, switch, `--`, thisDir, packageName, version, author, description, license, srcDir, binDir, backend, skipDirs, skipFiles, skipExt, installDirs, installFiles, installExt, bin, foreignDeps, - requires, task, packageName + requires, requiresData, task, packageName import strutils import "$1" diff --git a/tests/issue1158/issue1158.nimble b/tests/issue1158/issue1158.nimble new file mode 100644 index 00000000..29545a1b --- /dev/null +++ b/tests/issue1158/issue1158.nimble @@ -0,0 +1,17 @@ + +# Package + +version = "0.1.0" +author = "stoneface86" +description = "A new awesome nimble package" +license = "MIT" +srcDir = "src" + + +# Dependencies + +requires "nim >= 1.6.16" + +task echoRequires, "": + echo requiresData + diff --git a/tests/tissues.nim b/tests/tissues.nim index b8902a0d..4705ba95 100644 --- a/tests/tissues.nim +++ b/tests/tissues.nim @@ -424,3 +424,10 @@ suite "issues": # Clean up package file check execNimble(["refresh"]).exitCode == QuitSuccess + + test "issue #1158": + cd "issue1158": + let (output, exitCode) = execNimble("--silent", "echoRequires") + check: + exitCode == QuitSuccess + output.strip() == "@[\"nim >= 1.6.16\"]"