Skip to content

Commit

Permalink
fix(bluetooth-classic): trim the name output
Browse files Browse the repository at this point in the history
The hcitool command has a new line at the end of the output, which we
don't want in the entity.
  • Loading branch information
mKeRix committed Jan 27, 2020
1 parent bcb0d5a commit 072809a
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -191,7 +191,7 @@ export class BluetoothClassicService extends KalmanFilterable(Object, 1.4, 0.8)

try {
const output = await execPromise(`hcitool name "${address}"`);
return output.stdout ? output.stdout : undefined;
return output.stdout ? output.stdout.trim() : undefined;
} catch (e) {
this.logger.error(e.message);
return undefined;
Expand Down

0 comments on commit 072809a

Please sign in to comment.