Skip to content

Commit

Permalink
feat: it's not l-m-x if /etc/os-release doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
siiky committed Nov 6, 2024
1 parent cc308d0 commit e9ce8d0
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions deploy/codebase/lamassu-machine-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,15 @@ function command(cmd, cb) {
});
}

const isLMX = () =>
fs.readFileSync('/etc/os-release', { encoding: 'utf8' })
.split('\n')
.includes('IMAGE_ID=lamassu-machine-xubuntu')
const isLMX = () => {
try {
return fs.readFileSync('/etc/os-release', { encoding: 'utf8' })
.split('\n')
.includes('IMAGE_ID=lamassu-machine-xubuntu')
} catch (err) {
return false
}
}

const getOSUser = () => {
try {
Expand Down

0 comments on commit e9ce8d0

Please sign in to comment.