Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ng generate on Windows do not interpret correctly the path separator #11501

Closed
pjmolina opened this issue Jul 9, 2018 · 1 comment · Fixed by #11768
Closed

ng generate on Windows do not interpret correctly the path separator #11501

pjmolina opened this issue Jul 9, 2018 · 1 comment · Fixed by #11768
Labels
area: @angular/cli freq3: high P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful severity5: regression

Comments

@pjmolina
Copy link

pjmolina commented Jul 9, 2018

Bug Report

- [x] bug report

Area

- [?] devkit
- [?] schematics

Versions

Angular CLI: 6.0.8
Node: 10.4.1
OS: win32 x64 / Windows 10
Angular: 6.0.7

Repro steps

ng generate service services\Session

The log given by the failure

No log provided.

Desired functionality

Generated file should look like:

import { Injectable } from '@angular/core';

@Injectable({
  providedIn: 'root'
})
export class SessionService {
  constructor() {
  }
}

but it contains:

import { Injectable } from '@angular/core';

@Injectable({
  providedIn: 'root'
})
export class services\SessionService {
  constructor() {
  }
}

Note the services\SessionService identifier instead SessionService.
The '\' symbol is the path separator on windows.
This used to work on previous versions of CLI.

Mention any other details that might be useful

  • ng generate service services/Session works as expected.
  • ng generate service services\Session fails in the described way.
  • Files are generated on the expected locations and with expected names.
  • Content of files is not ok as described.
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: @angular/cli freq3: high P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful severity5: regression
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants