parseProjectDirArgument method
Parse the project directory argument.
Implementation
Directory parseProjectDirArgument() {
if (rest.length != 1) {
throw const UnrecoverableException(
'invalid project dir path',
exitInvalidArgument,
);
}
final Directory projectDir = getResolvedProjectDir(rest[0]);
if (!projectDir.existsSync()) {
throw const UnrecoverableException(
'specified local project dir does not exist',
exitInvalidArgument,
);
}
return projectDir;
}