replicatedhq / dockerfilelint

An opinionated Dockerfile linter.
https://www.fromlatest.io
MIT License
979 stars 84 forks source link

Escaped quotes cause TypeError #165

Open srcshelton opened 3 years ago

srcshelton commented 3 years ago

A RUN directive including the following (entirely legitimate, AFAIK) command invocation:

    sed -i \
        "/^apphome=/ s|\"[^\"]*\"$|\"${APPHOME}\"|" \
        "${APPHOME}/runapp.sh"

... generates the following output:

TypeError: Cannot read property 'endsWith' of undefined
    at findLineNumber (/dockerfilelinter/lib/lints_helpers.js:91:39)
    at promiseList.push.exec.then (/dockerfilelinter/lib/shellcheck.js:36:45)
    at process._tickCallback (internal/process/next_tick.js:68:7)

Line 205:
   /SC1009/ The mentioned syntax error was in this simple command.