mirror of
https://github.com/wkulhanek/bonob.git
synced 2025-12-21 17:33:29 +01:00
Explicit exit codes when running register
This commit is contained in:
@@ -77,6 +77,7 @@ Now within the LAN that contains the sonos devices run bonob the registration pr
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run \
|
docker run \
|
||||||
|
--rm \
|
||||||
--network host \
|
--network host \
|
||||||
simojenki/bonob register https://my-server.example.com/bonob
|
simojenki/bonob register https://my-server.example.com/bonob
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -9,7 +9,17 @@ if (params.length != 1) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const bonobUrl = new URLBuilder(params[0]!);
|
const bonobUrl = new URLBuilder(params[0]!);
|
||||||
registrar(bonobUrl)().then((success) => {
|
registrar(bonobUrl)()
|
||||||
if (success) console.log(`Successfully registered bonob @ ${bonobUrl} with sonos`);
|
.then((success) => {
|
||||||
else console.error(`Failed registering bonob @ ${bonobUrl} with sonos`);
|
if (success) {
|
||||||
|
console.log(`Successfully registered bonob @ ${bonobUrl} with sonos`);
|
||||||
|
process.exit(0);
|
||||||
|
} else {
|
||||||
|
console.error(`Failed registering bonob @ ${bonobUrl} with sonos`);
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
console.error(e);
|
||||||
|
process.exit(1);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user