Skip to content

Commit

Permalink
fix: split on EOL
Browse files Browse the repository at this point in the history
  • Loading branch information
scolladon committed Oct 10, 2023
1 parent 519248d commit ba94e9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/gitLfsHelper.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'
import { sep } from 'path'
import { EOL } from 'os'
import { GIT_FOLDER, UTF8_ENCODING } from './gitConstants'
import { EOLRegex } from './childProcessUtils'

const LFS_HEADER = Buffer.from('version https://git-lfs')

Expand All @@ -10,7 +10,7 @@ export const isLFS = (content: Buffer): boolean =>

export const getLFSObjectContentPath = (bufferContent: Buffer): string => {
const content = bufferContent.toString(UTF8_ENCODING)
const oid = content.split(EOL)[1].split(':')[1]
const oid = content.split(EOLRegex)[1].split(':')[1]
return [
GIT_FOLDER,
'lfs',
Expand Down

0 comments on commit ba94e9e

Please sign in to comment.