Files
now-deployment/node_modules/now/dist/util/deploy/should-deploy-dir.ts
2019-10-17 12:36:15 +09:00

19 lines
440 B
TypeScript

import { homedir } from 'os';
import promptBool from '../input/prompt-bool';
import { Output } from '../output';
export default async function shouldDeployDir(argv0: string, output: Output) {
let yes = true;
if (argv0 === homedir()) {
if (
!(await promptBool(
'You are deploying your home directory. Do you want to continue?'
))
) {
output.log('Aborted');
yes = false;
}
}
return yes;
}