Incorrect use of --directory param
- Langage dominant
- TypeScript
- Étoiles
- 27k
- Forks
- 11.8k
- Merge moyen
- 14 h 23 min
- PR mergées (30 j)
- 162
Description
# 🐞 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
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par reproduire `ng new app1 --directory=/tmp/app1 --skip-install` avec la version d’Angular CLI indiquée, puis suivez le point d’entrée de la CLI qui gère `new` et son option `--directory`. Le travail est terminé lorsqu’un répertoire absolu est créé dans `/tmp/app1`, plutôt que dans `./tmp/app1`, sans régression pour les chemins relatifs.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- angular, typescript
- Domaine
- cli
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Clairement spécifiée
- Accessibilité débutants
- 35/100