From aeb5bfd01c1173d36a2afff6a1bffcafd300b56d Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Tue, 12 Sep 2017 21:06:54 +0900 Subject: [PATCH] Add exception handling for symlink Change-Id: I013db6f560a5dcf4d9ebf4c4c4cec75043f6be1b Signed-off-by: Youngsoo Choi --- wrt/build/tasks/task-helpers.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/wrt/build/tasks/task-helpers.coffee b/wrt/build/tasks/task-helpers.coffee index 2819c95..113c421 100644 --- a/wrt/build/tasks/task-helpers.coffee +++ b/wrt/build/tasks/task-helpers.coffee @@ -12,6 +12,7 @@ module.exports = (grunt) -> stats = fs.lstatSync(sourcePath) if stats.isSymbolicLink() grunt.file.mkdir(path.dirname(destinationPath)) + grunt.file.delete(destinationPath, force: true) if grunt.file.exists(destinationPath) fs.symlinkSync(fs.readlinkSync(sourcePath), destinationPath) else if stats.isFile() grunt.file.copy(sourcePath, destinationPath) -- 2.7.4