mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-02-20 17:52:51 +00:00
Remove quotes in OS version
This commit is contained in:
parent
9965bfeca1
commit
71bd742dfe
@ -1,3 +1,5 @@
|
||||
* Remove quotes in OS version [Pablo]
|
||||
|
||||
# v1.5.0
|
||||
|
||||
* Add support for delta image download [petrosagg and Pablo]
|
||||
|
@ -186,7 +186,8 @@ exports.getOSVersion = ->
|
||||
for line in lines
|
||||
[ key, val ] = line.split('=')
|
||||
releaseItems[_.trim(key)] = _.trim(val)
|
||||
return releaseItems['PRETTY_NAME']
|
||||
# Remove enclosing quotes: http://stackoverflow.com/a/19156197/2549019
|
||||
return releaseItems['PRETTY_NAME'].replace(/^"(.+(?="$))"$/, '$1')
|
||||
.catch (err) ->
|
||||
console.log("Could not get OS Version: ", err, err.stack)
|
||||
return undefined
|
||||
|
Loading…
x
Reference in New Issue
Block a user