Platformio-atom-ide-terminal: Strange lines in terminal

Created on 8 Dec 2016  路  21Comments  路  Source: platformio/platformio-atom-ide-terminal

Hello !

In lastest Atom I have got this lines in terminal:

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

What is this?
OS: Fedora 25

external fixed invalid upstream-issue

Most helpful comment

When I got the .desktop file, I find this:

[Desktop Entry]
Name=Atom
Comment=A hackable text editor for the 21st Century.
GenericName=Text Editor
Exec=/usr/share/atom/atom %F
Icon=atom
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Utility;TextEditor;Development;
MimeType=text/plain;

Seems atom starts from a different location than /usr/bin/atom.
I ckecked with the console.
I've got the strange output that I haven't with /usr/bin/atom.
And more: I've got also this console output (if helps to resolve the problem):

$ /usr/share/atom/atom
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell

All 21 comments

Also using Fedora 25 on an Intel NUC Skull Canyon
`` bash: module: line 1: syntax error: unexpected end of file bash: error importing function definition forBASH_FUNC_module'
bash: scl: line 1: syntax error: unexpected end of file
bash: error importing function definition for BASH_FUNC_scl' /bin/sh: scl: line 1: syntax error: unexpected end of file /bin/sh: error importing function definition forBASH_FUNC_scl'
/bin/sh: module: line 1: syntax error: unexpected end of file
/bin/sh: error importing function definition for BASH_FUNC_module' /bin/sh: scl: line 1: syntax error: unexpected end of file /bin/sh: error importing function definition forBASH_FUNC_scl'
/bin/sh: module: line 1: syntax error: unexpected end of file
/bin/sh: error importing function definition for BASH_FUNC_module' /bin/sh: scl: line 1: syntax error: unexpected end of file /bin/sh: error importing function definition forBASH_FUNC_scl'
/bin/sh: module: line 1: syntax error: unexpected end of file

/bin/sh: error importing function definition for `BASH_FUNC_module'
``

can't reproduce this outside of atom... surprisingly, you can also trigger the same issue in gnome-terminal if you configure the karan/atom-terminal and open a terminal within Atom using the shortcuts

But is these strange console output an atom-core error? I ask this, because another package (git-control) have the same issue...

This is definitely an atom core error... is there a way to replicate this in safe mode?

I tried open atom in safe mode, but it doesn't load any package. I will try
again later...

Hello.
In safe mode, atom doesn't allow initialize any plugin...
More, this bug still occur in the latest version of the atom.
I'm going open a new issue in atom-core...

Hi, I've battled with the same issue for hours in Fedora 24. I don't understand how bash function export works and average-level googling did not help a lot. Besides, I need the "module" command to work so the typical solution "uninstall environment-modules" is no option for me.

Strangely enough, I found that if I start atom from the (bash) terminal, the messages are gone. So I bypassed the error by creating a script...

#!/bin/bash
/usr/bin/atom

... and updating the Atom shortcut (in my KDE menu, gnome should be similar) to use this script. This perhaps forces some bash magic I don't understand. But voila, I am done :-)

OK. I will try your solution.

When I got the .desktop file, I find this:

[Desktop Entry]
Name=Atom
Comment=A hackable text editor for the 21st Century.
GenericName=Text Editor
Exec=/usr/share/atom/atom %F
Icon=atom
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Utility;TextEditor;Development;
MimeType=text/plain;

Seems atom starts from a different location than /usr/bin/atom.
I ckecked with the console.
I've got the strange output that I haven't with /usr/bin/atom.
And more: I've got also this console output (if helps to resolve the problem):

$ /usr/share/atom/atom
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell

Well, the /usr/bin/atom already does the necessary bash setup. So just change the desktop file and you're done. Easier than my previous solution. Thanks.

Thanks.
Does atom team correct this bug in the next release? It is only an one line
change...

What's the status on this? I still get this error as of Atom 1.17

Based on @TJProgrammer's comments, just changing /usr/share/atom/atom to /usr/bin/atom in the .desktop file would solve the problem for Fedora. Can this be done?

Just for the record, this issue is not exclusive to this package, it is reproducible also in atom core (see my comment here).

@samuelzyx Funny you should ask. https://github.com/atom/atom/pull/17508#issuecomment-396954902

The reason this has taken so long is that it was hard to reproduce without plugins. Strangely, the issue stopped happening for me on platformio-atom-ide-terminal on Fedora 28, but still happens on the github package. It used to happen every time I opened a terminal inside atom.

Please retest again with platformio-atom-ide-terminal 2.9.0 which since f64888d is using node-pty-prebuilt instead unmaintained and outdated pty.js. This is good news for stability and compatibility.

if issues persist, please open a new ticket with requested information.

Thx =)

Thanks. Now there isn't no strange output!

@TJProgrammer thank you for the follow up =)

Still I am getting this error on Fedora 31.

@djnotes

Thank you for reaching out with this bug report. Please see https://github.com/platformio/platformio-atom-ide-terminal/issues/120#issuecomment-396963677 and also try to export your paths to your ~/.bash_profile

For solution read https://github.com/platformio/platformio-atom-ide-terminal/issues/120#issuecomment-274870224 and solution on https://github.com/platformio/platformio-atom-ide-terminal/issues/120#issuecomment-392183183

This is an external issue to this project and was fixed upstream in https://github.com/atom/atom/pull/17508/files

  • When this was reported it was much older versions of Atom and platformio-ide terminal therefore its an obsolete ticket.
  • Does not have any information new or otherwise required to be able to duplicate. Info like the required fields in the issue template.
  • The issue is not related to this project.

Thank you for your understanding.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

televators picture televators  路  4Comments

hsaltan picture hsaltan  路  4Comments

sergei3000 picture sergei3000  路  4Comments

colorwin picture colorwin  路  5Comments

wo0dpeker picture wo0dpeker  路  4Comments