Flash instantly fails with linux AppImage and some function in ~/.bashrc
See original GitHub issue-
Etcher version: ./balenaEtcher-1.5.63-x64.AppImage
-
Operating system and architecture: ubuntu 18.04.3 amd64
-
Image flashed: raspberrypi3-2.43.0+rev1-v10.2.2.img.zip
-
Do you see any meaningful error information in the DevTools?
error
OperationalError {cause: Error: Command failed: cd "/home/thomas/Downloads"; "/usr/bin/pkexec" --disable-internal-agent /bin/…, isOperational: true, killed: false, code: 2, signal: null, …}
cause
:
Error: Command failed: cd "/home/thomas/Downloads"; "/usr/bin/pkexec" --disable-internal-agent /bin/bash -c "echo SUDOPROMPT; sh '/tmp/tmp-19334YmI5Y68PjJ8v.cmd'" /tmp/tmp-19334YmI5Y68PjJ8v.cmd: 113: export: BASH_FUNC_grep_custom%%: bad variable name at ChildProcess.exithandler (child_process.js:303:12) at ChildProcess.emit (events.js:182:13) at maybeClose (internal/child_process.js:961:16) at Socket.stream.socket.on (internal/child_process.js:380:11) at Socket.emit (events.js:182:13) at Pipe._handle.close [as _onclose] (net.js:596:12)
cmd
:
"cd "/home/thomas/Downloads"; "/usr/bin/pkexec" --disable-internal-agent /bin/bash -c "echo SUDOPROMPT; sh '/tmp/tmp-19334YmI5Y68PjJ8v.cmd'""
code
:
2
isOperational
:
true
killed
:
false
signal
:
null
message
:
"Command failed: cd "/home/thomas/Downloads"; "/usr/bin/pkexec" --disable-internal-agent /bin/bash -c "echo SUDOPROMPT; sh '/tmp/tmp-19334YmI5Y68PjJ8v.cmd'"↵/tmp/tmp-19334YmI5Y68PjJ8v.cmd: 113: export: BASH_FUNC_grep_custom%%: bad variable name↵"
name
:
"Error"
The interesting part is:
/tmp/tmp-19334YmI5Y68PjJ8v.cmd: 113: export: BASH_FUNC_grep_custom%%: bad variable name
The generated tmp cmd file contains a list of variables EXPORT
coming from my ~/.bashrc
:
export BASH_FUNC_declare_grep_exclude_arguments%%='() { <some work> }'
In my ~/.bashrc
:
function grep_custom() { <some work> }
export -f grep_custom
The export -f
seems to break the script generation which assumes sh
and not bash
.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Linux oh-shit moments : r/linux - Reddit
As a hacker and not wanting to download a new Raspbian, I came up with a hacky solution: update dpkg manually, then use...
Read more >Getting started with the proxmark3 easy - DT Info
This is a Getting Started walk-through for our Proxmark3 Easy hardware. Video Guide Walkthrough I walk through the process outlined in this ...
Read more >Bash script error: "function: not found". Why would this appear?
A likely cause is that the script doesn't have the execute bit set for the executing user, meaning that it's being read as...
Read more >Dotfile madness | Hacker News
dotfiles in the home folder are not a new thing on Linux (e.g. .bashrc, .profile, .emacs, etc.), even if it would be better...
Read more >How To Setup The Perfect Linux Workstation With Xubuntu ...
Every installation is increasingly easy, complete, stable, and fast. It is a great pleasure to use it. I am trying to keep my...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@lurch @jorangreef this is not related to sudo-prompt the script comes from https://github.com/balena-io/etcher/blob/master/lib/shared/permissions.js#L125
@thomas-riccardi fixed in
v1.5.64