YError: Invalid first argument. Expected boolean or string but received function.
chrisbs73 opened this issue · comments
I'm seeing this with the latest version of dockerfilelint. Running it from the command line or from a container. If I pull a container that's 4 months old I don't see this issue.
./bin/dockerfilelint /Users/cschlit/docker/java/Dockerfile.generated
YError: Invalid first argument. Expected boolean or string but received function.
at argumentTypeError (/Users/cschlit/temp/dockerfilelint/node_modules/yargs/lib/argsert.js:67:9)
at parsed.optional.forEach (/Users/cschlit/temp/dockerfilelint/node_modules/yargs/lib/argsert.js:49:39)
at Array.forEach ()
at argsert (/Users/cschlit/temp/dockerfilelint/node_modules/yargs/lib/argsert.js:44:21)
at Object.version (/Users/cschlit/temp/dockerfilelint/node_modules/yargs/yargs.js:790:5)
at Object. (/Users/cschlit/temp/dockerfilelint/bin/dockerfilelint:21:4)
at Module._compile (internal/modules/cjs/loader.js:722:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:733:10)
at Module.load (internal/modules/cjs/loader.js:620:32)
at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
File: /Users/cschlit/docker/java/Dockerfile.generated
Issues: None found 👍
Going back to this version (be1f746) on the container on dockerhub - I don't see this issue.
It looks like it's running through the testing correctly, but with that message coming up every time I run it, it looks like it's not working correctly.
Just cloned this out today - same error, different line numbers:
$ git -C dockerfilelint/ checkout tags/v1.5.0
Previous HEAD position was ad65813 chore(release): 1.4.0
HEAD is now at 09a5034 chore(release): 1.5.0
$ dockerfilelint/bin/dockerfilelint i386-3.9-wazuh/Dockerfile
YError: Invalid first argument. Expected boolean or string but received function.
at argumentTypeError (/usr/lib/nodejs/yargs/lib/argsert.js:65:9)
at parsed.optional.forEach (/usr/lib/nodejs/yargs/lib/argsert.js:47:39)
at Array.forEach (<anonymous>)
at argsert (/usr/lib/nodejs/yargs/lib/argsert.js:42:21)
at Object.version (/usr/lib/nodejs/yargs/yargs.js:757:5)
at Object.<anonymous> (/data/buildroot/data/src/embedded/docker/branches/main/dockerfilelint/bin/dockerfilelint:21:4)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
File: i386-3.9-wazuh/Dockerfile
Issues: 1
Line 1: FROM quay.io/pauljherring/i386-ubuntu-minimal
Issue Category Title Description
1 Clarity Base Image Missing Base images should specify a tag to use.
Tag
$ git -C dockerfilelint/ checkout master
Previous HEAD position was 09a5034 chore(release): 1.5.0
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
$ dockerfilelint/bin/dockerfilelint i386-3.9-wazuh/Dockerfile
YError: Invalid first argument. Expected boolean or string but received function.
at argumentTypeError (/usr/lib/nodejs/yargs/lib/argsert.js:65:9)
at parsed.optional.forEach (/usr/lib/nodejs/yargs/lib/argsert.js:47:39)
at Array.forEach (<anonymous>)
at argsert (/usr/lib/nodejs/yargs/lib/argsert.js:42:21)
at Object.version (/usr/lib/nodejs/yargs/yargs.js:757:5)
at Object.<anonymous> (/data/buildroot/data/src/embedded/docker/branches/main/dockerfilelint/bin/dockerfilelint:21:4)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
File: i386-3.9-wazuh/Dockerfile
Issues: 1
Line 1: FROM quay.io/pauljherring/i386-ubuntu-minimal
Issue Category Title Description
1 Clarity Base Image Missing Base images should specify a tag to use.
Tag
Yep, same error.
09a5034
is the most recent tag that works!
replicated/dockerfilelint:09a5034
is not working for me. Same failure.