Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

getting errors while using terminal #293

Closed
benjo11111 opened this issue Jul 29, 2017 · 8 comments · Fixed by atom/atom#20393
Closed

getting errors while using terminal #293

benjo11111 opened this issue Jul 29, 2017 · 8 comments · Fixed by atom/atom#20393

Comments

@benjo11111
Copy link

when i load terminal it gives me below errors.

bash: error importing function definition for `scl'
/bin/sh: scl: line 1: syntax error: unexpected end of file
/bin/sh: error importing function definition for `scl'
/bin/sh: module: line 1: syntax error: unexpected end of file
/bin/sh: error importing function definition for `module'
/bin/sh: scl: line 1: syntax error: unexpected end of file
/bin/sh: error importing function definition for `scl'
/bin/sh: module: line 1: syntax error: unexpected end of file
/bin/sh: error importing function definition for `module'
/bin/sh: scl: line 1: syntax error: unexpected end of file
/bin/sh: error importing function definition for `scl'
/bin/sh: module: line 1: syntax error: unexpected end of file
/bin/sh: error importing function definition for `module'

OS : FEDORA 26
ATOM : 1.18.0-0.1

@zwolfe21
Copy link

zwolfe21 commented Aug 4, 2017

I have this exact error as well.

OS: Fedora 26
Atom: 1.18.0

@zwolfe21
Copy link

zwolfe21 commented Aug 4, 2017

Hmm... This does not appear if atom is launched via terminal. Only occurs (for me) if launched from Gnome

@HerX121
Copy link

HerX121 commented Sep 2, 2017

This problem is a user misconfiguration in Fedora, try the solution of @cnicodeme (AtomLinter/linter-flake8#165)

For all others that have the same issue here, and are using Fedora, the solution is simple :

  1. Remove scl-utils : sudo dnf remove scl-utils. Don't worry, it's not useful on Fedora (it's more RHEL related)
  2. Reboot, and you won't have the problem again. This is important, if you don't reboot, nothing will change. (Don't ask me why!)

@alexfornuto
Copy link

I'm on Fedora 27, and removed scl-utils + reboot to solve some but not all of the lines coming up on a new terminal.

For anyone else who gets here first via Google with additional errors, see this issue comment for the other half of the solution.

@the-j0k3r
Copy link
Collaborator

Please retest again with platformio-atom-ide-terminal 2.9.0 is using node-pty-prebuilt instead unmaintained and outdated pty.js

@alexfornuto
Copy link

....Wat? Please review and add structure to the comment above, to increase clarity.

@the-j0k3r
Copy link
Collaborator

the-j0k3r commented Feb 8, 2019

@alexfornuto see f64888d

Its a considerable change in the application, this project no longer uses pty.js, any previous reports are invalid against node-pty-prebuilt version which start at platfomio-ide-terminal v2.9.0.
pty.js is an obsolete unmaintained project, its not suitable as a stable dependency and was quite buggy, node-pty-prebuilt is current and under active development, its more stable and reliable which results in a more robust application..

If platfomio-ide-terminal v2.9.0 doesnt fix the issue, a new report with the requested/required information should be opened.

If this is not clear enough, state clearly what your doubts are, simply asking for clarity isnt clear enough to what exactly your doubt(s) are.

@alexfornuto
Copy link

@the-j0k3r thanks, that clears up my confusion.

For reference, my issue wasn't with the technical decisions made. Your sentence simply lacked the form (punctuation, etc) required to convey the information. Now I understand, and if and when I use Atom again and hit an issue with the newer versions I will open a new issue.

xdelaruelle added a commit to xdelaruelle/atom that referenced this issue Feb 8, 2020
`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
xdelaruelle added a commit to xdelaruelle/atom that referenced this issue Feb 8, 2020
`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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants