Skip to content

ember g route my-route always turns the router.js file into crlf mode #130

Description

@keanedawg

Output from ember version --verbose && npm --version && yarn --version:

ember-cli: 3.13.2
http_parser: 2.8.0
node: 8.11.3
v8: 6.2.414.54
uv: 1.19.1
zlib: 1.2.11
ares: 1.10.1-DEV
modules: 57
nghttp2: 1.32.0
napi: 3
openssl: 1.0.2o
icu: 60.1
unicode: 10.0
cldr: 32.0
tz: 2017c
os: win32 x64
6.5.0
bash: yarn: command not found

I am able to recreate the bug from the following:

0.) open Git Bash

1.) Ember new testbug

2.) cd testbug/app

3.) check the newline character type (should all be set to UNIX)

find . -not \( -path './.git' -prune \) -type f -print0 | xargs -0 dos2unix -ih


     DOS    UNIX     MAC     BOM  TXTBIN       FILE
       0      14       0  no_bom    text    ./app.js
       0       0       0  no_bom    text    ./components/.gitkeep
       0       0       0  no_bom    text    ./controllers/.gitkeep
       0       0       0  no_bom    text    ./helpers/.gitkeep
       0      25       0  no_bom    text    ./index.html
       0       0       0  no_bom    text    ./models/.gitkeep
       0       3       0  no_bom    text    ./resolver.js
       0      12       0  no_bom    text    ./router.js
       0       0       0  no_bom    text    ./routes/.gitkeep
       0       0       0  no_bom    text    ./styles/app.css
       0       4       0  no_bom    text    ./templates/application.hbs
       0       0       0  no_bom    text    ./templates/components/.gitkeep

4.) ember g route test-route

5.) find . -not \( -path './.git' -prune \) -type f -print0 | xargs -0 dos2unix -ih


     DOS    UNIX     MAC     BOM  TXTBIN       FILE
       0      14       0  no_bom    text    ./app.js
       0       0       0  no_bom    text    ./components/.gitkeep
       0       0       0  no_bom    text    ./controllers/.gitkeep
       0       0       0  no_bom    text    ./helpers/.gitkeep
       0      25       0  no_bom    text    ./index.html
       0       0       0  no_bom    text    ./models/.gitkeep
       0       3       0  no_bom    text    ./resolver.js
      13       0       0  no_bom    text    ./router.js
       0       0       0  no_bom    text    ./routes/.gitkeep
       0       4       0  no_bom    text    ./routes/test-route.js
       0       0       0  no_bom    text    ./styles/app.css
       0       4       0  no_bom    text    ./templates/application.hbs
       0       0       0  no_bom    text    ./templates/components/.gitkeep
       0       0       0  no_bom    text    ./templates/test-route.hbs

The router.js file has mysteriously converted into CRLF format.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions