angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

@angular-devkit/core normalize+relative function return unexpected

Open wszgrcy opened this issue 1 year ago • 0 comments

Command

other

Is this a regression?

  • [ ] Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

Windows drive letters may not be case sensitive?

but use normalize windows path ,C://=>/C/ ,c://=>/c/

Minimal Reproduction

import {
  normalize,
  relative,
} from '@angular-devkit/core';
    let a1 = `E://abc`;
    let a2 = `e://abc/action`;
    let c = relative(normalize(a1), normalize(a2));
    c;

and relative return image If I compare directly using the Node API, the return result is normal

    let xxx=path.relative(a1,a2)

Exception or Error

No response

Your Environment

Angular CLI: 17.0.1
Node: 18.18.0
Package Manager: npm 9.8.1
OS: win32 x64

Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.1700.1 (cli-only)
@angular-devkit/core         17.0.1 (cli-only)
@angular-devkit/schematics   17.0.1 (cli-only)
@schematics/angular          17.0.1 (cli-only)

Anything else relevant?

No response

wszgrcy avatar Feb 03 '24 06:02 wszgrcy