Skip to content

Commit

Permalink
Merge pull request #177 from sasjs/cli.spec-fix
Browse files Browse the repository at this point in the history
fix(regexp): fixed newLine utility
  • Loading branch information
YuryShkoda authored Mar 15, 2022
2 parents eec480e + 2f0e73f commit 85fa446
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/formatter/regexp.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { newLine } from './'
import { isWindows } from '../utils'

describe('newLine', () => {
it('should return correct new line regexp entry for windows', () => {
Expand Down
6 changes: 4 additions & 2 deletions src/formatter/regexp.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { isWindows } from '../'
// FIXME: if isWindows is used, it breaks cli.spec.ts because Logger is undefined
// import { isWindows } from '../'
// export const newLine = () => (isWindows() ? '\\r\\n' : '\\n')

export const newLine = () => (isWindows() ? '\\r\\n' : '\\n')
export const newLine = () => (process.platform === 'win32' ? '\\r\\n' : '\\n')

0 comments on commit 85fa446

Please sign in to comment.