Skip to content

Commit

Permalink
Merge pull request #731 from particle-iot/fix/check-asset-name
Browse files Browse the repository at this point in the history
Enhance Asset Verification by Checking Both Name and Hash
  • Loading branch information
monkbroc committed May 9, 2024
2 parents 58e52f2 + adb1a4c commit 2aa0897
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cmd/serial.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ const cmd = path.basename(process.argv[1]);
const arrow = chalk.green('>');
const timeoutError = 'Serial timed out';

const availability = (asset, availableAssets) => availableAssets.some(availableAsset => availableAsset.hash === asset.hash);
const availability = (asset, availableAssets) => availableAssets.some(
availableAsset => availableAsset.hash === asset.hash && availableAsset.name === asset.name
);

const SERIAL_PORT_DEFAULTS = {
baudRate: 9600,
Expand Down

0 comments on commit 2aa0897

Please sign in to comment.