Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Commit

Permalink
fix(cli): read sectag correctly from flag
Browse files Browse the repository at this point in the history
  • Loading branch information
coderbyheart committed Sep 6, 2019
1 parent 9657902 commit 15c6555
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cli/commands/flash-cert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ export const flashCertificate = ({
description: 'Serial port, defaults to /dev/ttyACM0',
},
{
flags: '-t, --sectag <secTag>',
flags: '-t, --sectag <sectag>',
description: 'sec tag, defaults to 42',
},
],
action: async (
deviceId: string,
{ port, secTag }: { port?: string; secTag?: string },
{ port, sectag }: { port?: string; sectag?: string },
) => {
const deviceFiles = deviceFileLocations({ certsDir, deviceId })
const PORT = port || '/dev/ttyACM0'
const SEC_TAG = parseInt(secTag || '', 10) || 42
const SEC_TAG = parseInt(sectag || '', 10) || 42
const device = new ModemPort(PORT, {
writeCallback: (data: string) => {
console.log(chalk.magenta(data.trim()))
Expand Down

0 comments on commit 15c6555

Please sign in to comment.