# Bypass Electron CLI OTA Flash Confirmation? \[Solved - YES!\]

**URL:** <https://community.particle.io/t/bypass-electron-cli-ota-flash-confirmation-solved-yes/26635>\
**Category:** Troubleshooting\
**Created:** [October 20, 2016, 1:47am UTC](https://community.particle.io/t/bypass-electron-cli-ota-flash-confirmation-solved-yes/26635 "2016-10-20T01:47:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrissy](https://avatars.discourse-cdn.com/v4/letter/c/858c86/32.png) [@chrissy](https://community.particle.io/u/chrissy)\
**Post date:** [October 20, 2016, 1:47am UTC](https://community.particle.io/t/bypass-electron-cli-ota-flash-confirmation-solved-yes/26635/1 "2016-10-20T01:47:21Z")

</div>

Is there any way to bypass the confirmation required by CLI when flashing OTA? I’m using Visual Studio Code and [this tutorial](http://community.particle.io/t/use-visual-studio-code-for-your-particle-development-needs/26095/11) to create compile and flash tasks and I can’t enter any additional input once the tasks are run. Here’s the confirmation I’m trying to bypass:

 ![](https://us1.discourse-cdn.com/flex026/uploads/particle/original/2X/0/0357ac3692190d4ab135b4244a4decbd5a25115f.jpg)

I’ve tried piping an echo of the value I have to enter after flashing (0.005) and I tried to run it as a second command using && after a delay. Here is my tasks.json file:

 ![](https://us1.discourse-cdn.com/flex026/uploads/particle/original/2X/c/c2cfd6943abd5c46e6b0cb6e569e2743a06b161b.jpg)

Additional info: using Visual Studio Code 1.6.1 and Particle 1.7.0 on Windows 7.

Thanks!

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [October 20, 2016, 5:51am UTC](https://community.particle.io/t/bypass-electron-cli-ota-flash-confirmation-solved-yes/26635/2 "2016-10-20T05:51:04Z")

</div>

I’d comment out that part in the CLI scripts.

---

<div class="post-metadata">

**Author:** ![chrissy](https://avatars.discourse-cdn.com/v4/letter/c/858c86/32.png) [@chrissy](https://community.particle.io/u/chrissy)\
**Post date:** [October 20, 2016, 6:59am UTC](https://community.particle.io/t/bypass-electron-cli-ota-flash-confirmation-solved-yes/26635/3 "2016-10-20T06:59:43Z")

</div>

Where exactly can I find the CLI scripts?

---

<div class="post-metadata">

**Author:** ![Moors7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/moors7/32/588_2.png) [@Moors7](https://community.particle.io/u/Moors7)\
**Post date:** [October 20, 2016, 7:04am UTC](https://community.particle.io/t/bypass-electron-cli-ota-flash-confirmation-solved-yes/26635/4 "2016-10-20T07:04:00Z")

</div>

Seeing as it’s something you’ve installed on your computer, you’ll find them in their respective directory. Depending on how you installed them, look for either a ‘particle’ directory, or check your NPM directory for the particle-cli. I believe mine were in `C:\Users\[name]\AppData\Roaming\npm\node_modules`

---

<div class="post-metadata">

**Author:** ![chrissy](https://avatars.discourse-cdn.com/v4/letter/c/858c86/32.png) [@chrissy](https://community.particle.io/u/chrissy)\
**Post date:** [October 20, 2016, 3:21pm UTC](https://community.particle.io/t/bypass-electron-cli-ota-flash-confirmation-solved-yes/26635/5 "2016-10-20T15:21:39Z")

</div>

Got it to work, thanks!

In case anyone else is running into this problem, locate the file in `C:\Users\[name]\AppData\Roaming\npm\node_modules\particle-cli\commands\CloudCommands.js`. Modify the \_promptForOta function as such:

 ![](https://us1.discourse-cdn.com/flex026/uploads/particle/original/2X/3/3a9774006139abd63e66dd12866682a2b7e3eb29.png)

I commented out from `console.log()` to the end of `inquirer.prompt` and kept only the `resolve({list:[filename]})` line.

---

<div class="post-metadata">

**Author:** ![KyleG](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/kyleg/32/11077_2.png) [@KyleG](https://community.particle.io/u/KyleG)\
**Post date:** [October 21, 2016, 12:27am UTC](https://community.particle.io/t/bypass-electron-cli-ota-flash-confirmation-solved-yes/26635/6 "2016-10-21T00:27:31Z")

</div>

Thanks for the help @Moors7 @ScruffR!

---

<div class="post-metadata">

**Author:** ![kubark42](https://avatars.discourse-cdn.com/v4/letter/k/848f3c/32.png) [@kubark42](https://community.particle.io/u/kubark42)\
**Post date:** [April 16, 2018, 12:27pm UTC](https://community.particle.io/t/bypass-electron-cli-ota-flash-confirmation-solved-yes/26635/7 "2018-04-16T12:27:38Z")

</div>

UPDATE: @chrissy’s fix has slightly changed.

- The file has moved. On Windows, it is now at C:\Users[name]\AppData\Roaming\npm\node\_modules\particle-cli\commands\CloudCommands.js
- The required change is a little more complex. Instead of just commenting out code, the entire section in the brackets starting at [https://github.com/particle-iot/particle-cli/blob/5f2669228ecf493e786f31e09254d4868d428251/src/cmd/cloud.js#L219](https://github.com/particle-iot/particle-cli/blob/5f2669228ecf493e786f31e09254d4868d428251/src/cmd/cloud.js#L219) needs to be replaced by just `resolve(newFileMapping);`.

I think it’d be nice to have an override, like an extension to the existing `--force` flag or maybe a new flag like `--ota-yes`, to force CLI to ignore this blocking check.
