fix: allow bypassing empty dir check in fresh init (#146)

This commit is contained in:
iccee0
2022-04-23 15:15:53 +02:00
committed by GitHub
parent 7f5e2496c9
commit bfd5bd3e9f
+6 -1
View File
@@ -48,7 +48,12 @@ async function init(directory: string) {
try {
const dir = [...Deno.readDirSync(directory)];
if (dir.length > 0) {
if (
dir.length > 0 &&
!confirm(
"This is no Empty directory, some Files could get deleted, do you want to continue?",
)
) {
error("Directory is not empty.");
}
} catch (err) {