Remove quotes in OS version

This commit is contained in:
Pablo Carranza Velez 2016-02-15 19:03:06 +00:00
parent 9965bfeca1
commit 71bd742dfe
2 changed files with 4 additions and 1 deletions

View File

@ -1,3 +1,5 @@
* Remove quotes in OS version [Pablo]
# v1.5.0
* Add support for delta image download [petrosagg and Pablo]

View File

@ -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