Incorrect use of --directory param
- Lenguaje dominante
- TypeScript
- Estrellas
- 27k
- Forks
- 11.8k
- Merge medio
- 14 h 23 min
- PR fusionados (30 d)
- 162
Descripción
# 🐞 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
Guía de contribución
Línea de trabajo
Comienza reproduciendo `ng new app1 --directory=/tmp/app1 --skip-install` con la versión indicada de Angular CLI y, a continuación, sigue el punto de entrada de la CLI que gestiona `new` y su opción `--directory`. Se considera terminado cuando se crea un directorio absoluto en `/tmp/app1`, en lugar de `./tmp/app1`, sin introducir regresiones en las rutas relativas.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- angular, typescript
- Área
- cli
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bien especificado
- Aptitud para principiantes
- 35/100