Skip to content

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

Closed

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

Activity

  1. added
    freq1: low
    on Feb 5, 2024
  2. added a commit that references this issue on Jan 9, 2025
    a7b6566
  3. added 2 commits that reference this issue on Jan 9, 2025
    ce7c4e2
    7b79682
  4. added a commit that references this issue on Jan 9, 2025
    adf9359
  5. angular-automatic-lock-bot commented on Feb 9, 2025

    @angular-automatic-lock-bot

    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.

  6. locked and limited conversation to collaborators on Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: @angular-devkit/corefreq1: lowseverity3: brokentype: bug/fix

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions