Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Skip initialization when directory does not exists (#354)
  • Loading branch information
paweljankowiak06 authored and samdark committed Mar 31, 2018
1 parent febabd5 commit 0323ff9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion init
Expand Up @@ -57,8 +57,15 @@ if (empty($params['env'])) {
}
}

$rootPath = "$root/environments/{$env['path']}";
if (!is_dir($rootPath)) {
printError("$rootPath directory does not exist. Check path in $envName environment.");
exit(3);
}

echo "\n Start initialization ...\n\n";
$files = getFileList("$root/environments/{$env['path']}");

$files = getFileList($rootPath);
if (isset($env['skipFiles'])) {
$skipFiles = $env['skipFiles'];
array_walk($skipFiles, function(&$value) use($env, $root) { $value = "$root/$value"; });
Expand Down

0 comments on commit 0323ff9

Please sign in to comment.