Skip to content

Commit

Permalink
improvement: add explicit warn message
Browse files Browse the repository at this point in the history
Added explicit warn that include path cannot be resolved from Dockerfile ARG and ENV variables
  • Loading branch information
ivanbabenko authored and edvald committed Sep 23, 2020
1 parent ec6a6a5 commit fc590e1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion core/src/plugins/container/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { LogEntry } from "../../logger/log-entry"
import chalk from "chalk"
import isUrl from "is-url"
import titleize from "titleize"
import { stripQuotes } from "../../util/string"
import { deline, stripQuotes } from "../../util/string"
import { PluginContext } from "../../plugin-context"
import { ModuleVersion } from "../../vcs/vcs"

Expand Down Expand Up @@ -386,6 +386,11 @@ const helpers = {
} else if (path.match(/(?<!\\)(?:\\\\)*\$[{\w]/)) {
// If the path contains a template string we can't currently reason about it
// TODO: interpolate args into paths
log.warn(chalk.yellow(deline`
Resolving include paths from Dockerfile ARG and ENV variables is not supported yet. Please specify
required path in Dockerfile explicitly or use ${chalk.bold("include")} for path assigned to ARG or ENV.
`)
)
return undefined
}
}
Expand Down

0 comments on commit fc590e1

Please sign in to comment.