Incorrect use of --directory param
- 主要言語
- TypeScript
- スター
- 27k
- フォーク
- 11.8k
- 平均マージ
- 14時間 23分
- マージ済み PR(30日)
- 162
説明
# 🐞 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
コントリビューションガイド
調査の方向性
まず、報告されている Angular CLI のバージョンで `ng new app1 --directory=/tmp/app1 --skip-install` を再現し、次に `new` とその `--directory` オプションを処理する CLI のエントリポイントを追跡します。相対パスにリグレッションを発生させずに、`./tmp/app1` ではなく `/tmp/app1` に絶対ディレクトリが作成されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- cli
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 35/100