Add exception handling for symlink 94/149594/3
authorYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 12 Sep 2017 12:06:54 +0000 (21:06 +0900)
committermin7.choi <min7.choi@samsung.com>
Fri, 22 Sep 2017 01:43:48 +0000 (10:43 +0900)
Change-Id: I013db6f560a5dcf4d9ebf4c4c4cec75043f6be1b
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
wrt/build/tasks/task-helpers.coffee

index 2819c95..113c421 100644 (file)
@@ -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)