Related changes
- Remove AppImages related binary blob from `scripts/build/AppImages` and
fetch them from the internet instead.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
We don't really do x64 builds for OS X at the moment, but nice to make
the build scripts consistent.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
Drives with long names or descriptions expand outside the drivelist,
this commit fixes that using CSS `word-break: break-all`.
Change-Type: patch
Changelog-Entry: Wrap drive names and descriptions in the drive selector widget.
This is the first step towards decoupling the build system as many
different scripts, for maintainability and convenience purposes.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
Currently we resolve `false`, which might not mean very much to some
modal use cases. `undefined` is a much more generic falsy value.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
Pressing the ESC key in any modal dialogue currently just emits a
message. This change actually cancels the modal, closing it.
Closes: https://github.com/resin-io/etcher/issues/874
Change-Type: patch
Changelog-Entry: Allow the user to press ESC to cancel a modal dialog.
If the child process (e.g: writer proxy, or CLI) emits either an error,
or an invalid output, the error will be emitted to the GUI, which will
report it to the state machine, however the IPC server will keep
receiving further messages, which will be passed to the GUI, which will
keep trying to update the state, in which case Redux will rightfully
complain that we can't update the flashing state if there is no flash in
process.
As a solution, we make sure the IPC server is terminated on every
possible error code flow, and to do this effectively, we needed to
manually destroy every connected socket before actually closing the
server.
Change-Type: patch
Changelog-Entry: Fix "Can't set the flashing state when not flashing" error.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
Turns out that when the parent process gets SIGKILL, the children
process would still remain alive.
In order to mitigate this, we force the IPC client opened by the child
writer to not attempt to reconnect to the IPC server if this one dies,
so we can catch the "disconnect" event and kill the children as a
result.
Fixes: https://github.com/resin-io/etcher/issues/850
Change-Type: patch
Changelog-Entry: Fix writing process remaining alive after the GUI is closed.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
The CLI requires elevation permissions to actually be able to write to
drives. For this reason, it makes sense that we introduce such a check
early on.
See: https://github.com/resin-io/etcher/issues/726
Change-Type: patch
Changelog-Entry: Check available permissions in the CLI early on.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
- Move UNIX unmount functionality to the CLI module
- Run `electron-mocha` for the CLI code
- Make unmount command templates that take a `drivelist` object as input
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
Currently, the wording "same" versus "new" on the completion screen
is ambiguous when they respectively mean use the same image file, or use a new
and different image file. Therefore, change the wording from "new" to
"different".
Closes: https://github.com/resin-io/etcher/issues/839
The current version would exit with error code 0 even when the tests
failed, causing CI servers to report false positives.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
This was a small issue affected due to the change in order of the
supported extensions in the ImageSelectionController.
Since we want to test that the array contents are equally the same
independently on the order, we sort both sides of the assertion.
This issue was not caught before since `electron-mocha` was reporting
exit code 0 even when there were changes failing, causing the CI
services to incorrectly support success.
See: https://github.com/resin-io/etcher/pull/854
See: https://github.com/resin-io/etcher/pull/806
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
Publishing to Homebrew Cask involves changing a Cask file in the
official Cask registry pull request updating the `version` and `sha256`
properties.
See: https://github.com/caskroom/homebrew-cask/pull/26319
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
This key is added as the long description of the Debian package.
Omitting this option means that `description` is duplicated two times,
which is of course not the desired outcome.
See: https://github.com/resin-io/etcher/issues/632
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
Every modal in the application should contain the same "close" X at the
top right corner, for consistency purposes. The only modal lacking this
button was the update notifier modal.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
- Change dialog message to "Are you sure you want to turn this on? You
will be able to overwrite your system drives if you're not careful."
- Remove "CANCEL" button and put a cross at the top right corner.
- Change dialog button label from "YES, CONTINUE" to "ENABLE UNSAFE
MODE"
In order to adapt to changes described above:
- `WarningModalService.display()` now takes an object including
`description`, and `confirmationLabel`
Fixes: https://github.com/resin-io/etcher/issues/729
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
We're interested in the following change, which causes the last
unaligned block on an image to be aligned to 512K instead of to 1M if
its smaller than 512K, and to 1M otherwise.
- https://github.com/resin-io-modules/etcher-image-write/pull/58
Fixes: https://github.com/resin-io/etcher/issues/685
Change-Type: patch
Changelog-Entry: Fix "Not Enough Space" error when flashing unaligned images.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
The `settings-dangerous-modal` modal size class doesn't exist anymore,
and was renamed to `warning-modal`. This was causing the exclamation
sign from the header to not be displayed in red, as it should.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
This commit notes down the most important technologies used by Etcher,
so that contributors know what they should focus their learning in.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
Repository description says "Flash OS images to SD cards & USB drives,
safely and easily.", while `package.json` currently says "An image
flasher with support for Windows, OS X and GNU/Linux.", and `README.md`
contains "Flash OS images to SD cards & USB drives, safe & easy."
See: https://github.com/resin-io/etcher/issues/797
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
This dependency is already being listed in `optionalDependencies`, which
the place it really belongs to.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
There are some settings, such as "unsafe mode", that prompt the user for
confirmation before actually confirming the setting. In these cases,
when the user attempts to check the checkbox, the checkbox remains
checked unless the user rejects the confirmation dialog, in which case
the checkbox value is reverted.
In order to provide a better UX, we now keep the checkbox unchecked
until the user confirms.
See: https://github.com/resin-io/etcher/issues/729
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
The new ordering of the main supported extensions will be: `img`, `iso`,
`zip`.
We make use of `_.intersection` in order to ensure that the values we're
hardcoding indeed exist in the list of all supported format extensions,
otherwise they won't appear at all. This ensures we never show
extensions that are not supported.
Partly fixes: https://github.com/resin-io/etcher/issues/787
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
- This new version passes `force` to `diskutil unmountDisk`
Change-Type: patch
Changelog-Entry: Fix `at least one volume could not be unmounted` error in OS X.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
Currently, we are not making sure the IPC server we start at
`lib/src/child-writer/index.js` gets closed when the child process exits
(successfully or not). This eventually causes issues when the user click
"flash again", since the stateful `ipc` global exposed by `node-ipc`
gets initialised again, causing the module to get to an invalid state
that eventually results in `this.log is not a function`.
- We've added `ipc.server.stop()` to both the `error` and `close` event
handlers (which are self exclusive, according to the docs).
- We've added `child.kill()` to the child `stderr` handler, since that
function causes the `close` event to be triggered, which in turns
calls `ipc.server.stop()`.
Change-Type: patch
Changelog-Entry: Fix `this.log is not a function` error when clicking "flash again".
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
`yargs` wraps help output lines, causing the examples to be displayed
like this:
```
Examples:
/usr/bin/nodejs bin/etcher
raspberry-pi.img
/usr/bin/nodejs bin/etcher --no-check
raspberry-pi.img
/usr/bin/nodejs bin/etcher -d /dev/disk2
ubuntu.iso
/usr/bin/nodejs bin/etcher -d /dev/disk2
-y rpi.img
```
As a solution, we can set `.wrap(null)` to completely disable wrapping.
Fixes: https://github.com/resin-io/etcher/issues/810
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
The `docs/CLI.md` points to user to `docs/CONTRIBUTING.md` for
instructions in how to install dependencies. This document previously
included the explicit `npm` commands to run, but was then changed to
point to the platform scripts, which means that if the user follows the
current instructions but has a NodeJS version which is not ABI
compatible with the NodeJS version used by the currently used Electron
version, the user will get an incompatibility error.
Fixes: https://github.com/resin-io/etcher/issues/801
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
Setting a Chocolatey cache and Making sure it gets persisted means that
future builds don't have to download every Chocolatey package from the
internet every time.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
We are not using Hound CI to display lint warnings anymore. The CI
servers are in charge of running the linters now.
Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>