Skip to content

Different parsing of --bh attribute on windows and unix OS #3986

@ptsydzik-zz

Description

@ptsydzik-zz

Please provide us with the following information:

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

Versions.

angular-cli: 1.0.0-beta.24
node: 5.11.1
os: darwin x64
@angular/common: 2.4.1
@angular/compiler: 2.4.1
@angular/core: 2.4.1
@angular/forms: 2.4.1
@angular/http: 2.4.1
@angular/platform-browser: 2.4.1
@angular/platform-browser-dynamic: 2.4.1
@angular/router: 3.4.1
@angular/compiler-cli: 2.4.1

Repro steps.

update package.json to have
"build": "ng build --bh '${rootContext}/' --environment=prod --target=production",
line in script section

this will have correct output in index.html on Linux/OSX <base href="${rootContext}/">
but on windows its will be <base href="'${rootContext}/'">
if change package.json to have "build": "ng build --bh \"${rootContext}\/" --environment=prod --target=production", we will got correct otput on Windows but on Linux/OSX it will be <base href="">.
if package.json to have line like this "build": "ng build --bh ${rootContext}/ --environment=prod --target=production",, output will be invalid on both OS.

Note:

${rootContext} - is a var that will be replaced by java backend on server then return index.html to user.

Question

How to make it works on any OS?

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgenthelp wantedLabel noting an issue which the team is looking for contribution from the community to fixtype: bug/fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions