Skip to content

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

Closed
@wszgrcy

Description

@wszgrcy

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

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions