revert templatingTask

This commit is contained in:
Fabian Chong
2020-09-16 15:19:20 +08:00
parent 820304af3c
commit d0104e2052
+9
View File
@@ -91,6 +91,15 @@ export async function templatingTask(
);
});
});
} else {
await Task.forItem('copying', basename(file), async () => {
await fs.copyFile(file, destinationFile).catch(error => {
const destination = destinationFile;
throw new Error(
`Failed to copy file to ${destination} : ${error.message}`,
);
});
});
}
}
}