Skip to content

angular cli will remove the target of the soft symbolic hardly in the dist dir #15183

Closed
@rdkmaster

Description

@rdkmaster

🐞 Bug report

Command (mark with an x)

- [ ] new
- [x ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Is this a regression?

Yes, the previous version in which this bug was not present was: ....

angular cli 1.6.8 is fine

Description

A clear and concise description of the problem...

In my case, I need to create a symbolic pointing to the source code of my project, angular cli will remove the target dir of the soft symbolic hardly in the dist dir instead of just remove the soft symbolic itself when is use ng build command.

🔬 Minimal Reproduction

run the following commands

git clone https://github.com/rdkmaster/jigsaw.git
cd jigsaw
npm i
mkdir output
cd output
ln -s .. source
cd ..
ng build --output-path output # this command should be failure everytime

the last command should be failure everytime, and print the following error

ENOTDIR: not a directory, rmdir '/home/rdk/jigsaw-for-ued/www/jigsaw/source'
Error: ENOTDIR: not a directory, rmdir '/home/rdk/jigsaw-for-ued/www/jigsaw/source'
    at Object.rmdirSync (fs.js:684:3)
    at Observable.rxjs_1.Observable [as _subscribe] (/home/rdk/jigsaw-for-ued/jigsaw-source/node_modules/@angular-devkit/core/node/host.js:207:28)
    at Observable._trySubscribe (/home/rdk/jigsaw-for-ued/jigsaw-source/node_modules/rxjs/internal/Observable.js:44:25)
    at Observable.subscribe (/home/rdk/jigsaw-for-ued/jigsaw-source/node_modules/rxjs/internal/Observable.js:30:22)
    at /home/rdk/jigsaw-for-ued/jigsaw-source/node_modules/rxjs/internal/util/subscribeTo.js:22:31
    at Object.subscribeToResult (/home/rdk/jigsaw-for-ued/jigsaw-source/node_modules/rxjs/internal/util/subscribeToResult.js:10:45)
    at MergeMapSubscriber._innerSub (/home/rdk/jigsaw-for-ued/jigsaw-source/node_modules/rxjs/internal/operators/mergeMap.js:82:29)
    at MergeMapSubscriber._tryNext (/home/rdk/jigsaw-for-ued/jigsaw-source/node_modules/rxjs/internal/operators/mergeMap.js:76:14)
    at MergeMapSubscriber._next (/home/rdk/jigsaw-for-ued/jigsaw-source/node_modules/rxjs/internal/operators/mergeMap.js:59:18)
    at MergeMapSubscriber.Subscriber.next (/home/rdk/jigsaw-for-ued/jigsaw-source/node_modules/rxjs/internal/Subscriber.js:66:18)
    at Observable._subscribe (/home/rdk/jigsaw-for-ued/jigsaw-source/node_modules/rxjs/internal/util/subscribeToArray.js:5:20)
    at Observable._trySubscribe (/home/rdk/jigsaw-for-ued/jigsaw-source/node_modules/rxjs/internal/Observable.js:44:25)
    at Observable.subscribe (/home/rdk/jigsaw-for-ued/jigsaw-source/node_modules/rxjs/internal/Observable.js:30:22)
    at MergeMapOperator.call (/home/rdk/jigsaw-for-ued/jigsaw-source/node_modules/rxjs/internal/operators/mergeMap.js:39:23)
    at Observable.subscribe (/home/rdk/jigsaw-for-ued/jigsaw-source/node_modules/rxjs/internal/Observable.js:25:31)
    at /home/rdk/jigsaw-for-ued/jigsaw-source/node_modules/rxjs/internal/util/subscribeTo.js:22:31

And, if I remove the symbolic output/source before the ng build command, everything goes fine again.

🔥 Exception or Error





🌍 Your Environment





Anything else relevant?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions