Skip to content

Commit

Permalink
Remove port option for this phase
Browse files Browse the repository at this point in the history
  • Loading branch information
keeramis committed May 29, 2024
1 parent 9f725ea commit 9649701
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
12 changes: 3 additions & 9 deletions src/cli/wifi.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,12 @@ const unindent = require('../lib/unindent');
module.exports = ({ commandProcessor, root }) => {
const wifi = commandProcessor.createCategory(root, 'wifi', 'Configure Wi-Fi credentials to your device (Supported on Gen 3+ devices).');

const portOption = {
'port': {
describe: 'Use this serial port instead of auto-detecting. Useful if there are more than 1 connected device'
}
};

commandProcessor.createCommand(wifi, 'add', 'Adds a WiFi network to your device', {
options: Object.assign({
'file': {
description: 'Take the credentials from a JSON file instead of prompting for them'
}
}, portOption),
}),
handler: (args) => {
const WiFiCommands = require('../cmd/wifi');
return new WiFiCommands().addNetwork(args);
Expand Down Expand Up @@ -44,7 +38,7 @@ module.exports = ({ commandProcessor, root }) => {
'ssid': {
description: 'The name of the network to join'
},
}, portOption),
}),
handler: (args) => {
const WiFiCommands = require('../cmd/wifi');
if (args.ssid) {
Expand Down Expand Up @@ -95,7 +89,7 @@ module.exports = ({ commandProcessor, root }) => {
'ssid': {
description: 'The name of the network to remove'
}
}, portOption),
}),
handler: (args) => {
const WiFiCommands = require('../cmd/wifi');
return new WiFiCommands().removeNetwork(args);
Expand Down
2 changes: 0 additions & 2 deletions test/e2e/wifi.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ const { expect } = require('../setup');
const cli = require('../lib/cli');
const {
WIFI_SSID,
WIFI_SECURITY,
WIFI_PASSWORD,
WIFI_CREDS_FILE
} = require('../lib/env');

Expand Down

0 comments on commit 9649701

Please sign in to comment.