findDockerfile method
Implementation
String findDockerfile() {
var projectPath = DartProject.self.pathToProjectRoot;
if (DartScript.self.isPubGlobalActivated || DartScript.self.isCompiled) {
projectPath = pwd;
}
if (exists(join(projectPath, 'Dockerfile'))) {
return projectPath;
}
if (exists(join(projectPath, '..', 'Dockerfile'))) {
return join(projectPath, '..');
} else {
printerr('The Dockerfile must be present in the project root at '
'${truepath(projectPath)}.');
showUsage(argParser);
exit(1);
}
}