-
Notifications
You must be signed in to change notification settings - Fork 3
Error importing function definition for BASH_FUNC_module' #68
Comments
The only differences between |
I see. How can I help to find out which one is the culprit? |
I don't know how |
Actually it looks like your Bash init script is referencing (The error is being forwarded on from the shell as it tries to execute |
Well since he is using |
Well, I definitely do have I tried to find the string
Interesting part of that file:
Regarding the dependencies, the difference is as follows.
0.6.2 depends on:
As you can see it is pretty big difference. I would bet on that 'sb-exec' package if I had to shoot blindly. |
Hello Same problem for me on a fresh install (fedora22). I just install Atom (using rpm) and language-puppet/linter-puppet-lint. (0.6.3) Regards |
A workaround is to remove package More information here: https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=1185565 |
To be honest, |
Oh well, I can confirm that removing of I do have it installed intentionally though, as I was using docker with ruby framework based on RSpec to test some of my stuff. Since then I moved it to one of the virtual instances in the cloud, so I don't need it right now, but sometimes it could handy to be able to run it locally... Anyway, thanks to all of you to find the root cause and workaround! |
@johny-mnemonic You can do this without |
@mschuchard OK, will check it in case I find the need to have it locally again. |
Sounds great. |
Yes it's ok for me :) Regards |
Great, thanks guys! |
I ran into a similar issue which I figured I'd share here in case it's useful to anyone. Got a similar error message: error importing function definition for `BASH_FUNC_module' After some digging around, I found the culprit to be the file /usr/share/Modules/init/bash:
Simply removing that file, logging out then back in and opening Atom again, will fix the error. This file is part of the RPM "environment-modules" on my system (Fedora-24) A similar issue is discussed here: https://bugzilla.redhat.com/show_bug.cgi?id=1147043 I hope this helps someone in the future |
My way without the need of removing cd path/to/project
atom . I'm using |
`getEnvFromShell` function calls `env` command through shell to get all defined environment variable. However `env` also returns the shell function defined with their whole code written on multiple lines. Such shell function definitions were not properly handled by `getEnvFromShell` which led to the following kind of error messages (seen for instance when running a terminal package in Atom): bash: module: line 1: syntax error: unexpected end of file bash: error importing function definition for `BASH_FUNC_module' With this change `getEnvFromShell` now skips shell function definition to guarantee only environment variables are recorded and a sane `result` array is returned. Fixes atom#20389 Fixes atom#17369 Fixes atom#13451 Fixes blueimp/atom-open-terminal-here#27 Fixes blueimp/atom-open-terminal-here#18 Fixes bus-stop/Termination#101 Fixes bus-stop/terminus#24 Fixes platformio/platformio-atom-ide-terminal#120 Fixes platformio/platformio-atom-ide-terminal#293 Fixes AtomLinter/linter-pylint#243 Fixes AtomLinter/linter-flake8#643 Fixes AtomLinter/linter-flake8#165 Fixes AtomLinter/linter-flake8#422 Fixes AtomLinter/linter-puppet-lint#68 Fixes autocomplete-python/autocomplete-python#347
`getEnvFromShell` function calls `env` command through shell to get all defined environment variable. However `env` also returns the shell function defined with their whole code written on multiple lines. Such shell function definitions were not properly handled by `getEnvFromShell` which led to the following kind of error messages (seen for instance when running a terminal package in Atom): bash: module: line 1: syntax error: unexpected end of file bash: error importing function definition for `BASH_FUNC_module' With this change `getEnvFromShell` now skips shell function definition to guarantee only environment variables are recorded and a sane `result` array is returned. Fixes atom#20389 Fixes atom#17369 Fixes atom#13451 Fixes blueimp/atom-open-terminal-here#27 Fixes blueimp/atom-open-terminal-here#18 Fixes bus-stop/Termination#101 Fixes bus-stop/terminus#24 Fixes platformio/platformio-atom-ide-terminal#120 Fixes platformio/platformio-atom-ide-terminal#293 Fixes AtomLinter/linter-pylint#243 Fixes AtomLinter/linter-flake8#643 Fixes AtomLinter/linter-flake8#165 Fixes AtomLinter/linter-flake8#422 Fixes AtomLinter/linter-puppet-lint#68 Fixes autocomplete-python/autocomplete-python#347
Since I updated linter-puppet-lint to 0.6.2, I am getting this nasty error:
I thought, it was caused by Atom editor update, so I tried at least six different versions, which didn't help. So I thought it's caused by Linter plugin itself, as I was getting same error also for linter-erb, but also to no vain. Than I tried downgrading linter-puppet-lint and with 0.6.1 error went away and everything works.
I am running Atom on Linux Fedora with default shell set to ZSH.
The text was updated successfully, but these errors were encountered: