Incorrect use of --directory param
- Ngôn ngữ chính
- TypeScript
- Star
- 27k
- Fork
- 11.8k
- Merge trung bình
- 14 giờ 23 phút
- Pull request đã merge (30 ngày)
- 162
Mô tả
# 🐞 Bug report
### Command (mark with an `x`)
- [x] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] extract-i18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
### Is this a regression?
No, this issue has been in the CLI for a long time
### Description
When using the `--directory` param with the absolute path, the CLI does not respect the value and creates the directory path relative to the current directory instead.
## 🔬 Minimal Reproduction
Run the following command:
```shell
ng new app1 --directory=/tmp/app1 --skip-install
```
Expected behaviour:
The application is generated within `/tmp/app1` directory.
Actual behaviour:
The application is generated within current directory: `./tmp/app1`
## 🌍 Your Environment
Angular CLI: 11.0.2
Node: 14.15.0
OS: darwin x64
Angular:
...
Ivy Workspace:
Package Version
------------------------------------------------------
@angular-devkit/architect 0.1100.2 (cli-only)
@angular-devkit/core 11.0.2 (cli-only)
@angular-devkit/schematics 11.0.2 (cli-only)
@schematics/angular 11.0.2 (cli-only)
@schematics/update 0.1100.2 (cli-only)
**Anything else relevant?**
Using macOS
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện `ng new app1 --directory=/tmp/app1 --skip-install` với phiên bản Angular CLI được báo cáo, sau đó lần theo điểm vào CLI xử lý `new` và tùy chọn `--directory` của nó. Được xem là hoàn tất khi một thư mục tuyệt đối được tạo tại `/tmp/app1`, thay vì `./tmp/app1`, mà không gây hồi quy đối với các đường dẫn tương đối.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- angular, typescript
- Lĩnh vực
- cli
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 35/100