GoogleCodeArchives / editra

Automatically exported from code.google.com/p/editra
Other
0 stars 0 forks source link

Launch plugin: no error reported for invalid/missing command #429

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Add a new command in the config dialog
2. Specify a non-existing command
3. Run a file with new command

What is the expected output? What do you see instead?
A warning about an invalid command would be nice, but instead nothing is
reported

IMPORTANT!!! Please answer these questions for any and ALL bug reports

What version of the product are you using? On what operating system?
0.5.15 (source)

What method of install was your version installed with (Binary/Source)?

If from source: What version of python and wxPython are you using?

Please provide any additional information below.

Original issue reported on code.google.com by rogerbr...@gmail.com on 13 Nov 2009 at 8:37

GoogleCodeExporter commented 9 years ago
Hi,

Editra simply passes the command you give it off to the shell and lets it run. 
There
is no way to tell if you created an invalid command or not nor what the 
definition of
invalid would be. If I create a command that is for some non existent program in
launch I see the following output when I run it.

>>> fakecmd ed_main.py
/bin/sh: fakecmd: command not found
>>> Exit Code: 127

Which is the text returned by the shell on my system (OSX 10.5).

What operating system are you on, version of python, ect...?

Original comment by CodyPrec...@gmail.com on 14 Nov 2009 at 2:01

GoogleCodeExporter commented 9 years ago
Hi,

I'm running Windows with Python 2.6.4. If I click 'Run' to execute some made up
command, then I get no indication that the command isn't running (the 'Run' 
button
turns into 'Abort'). A message box would be good in this case.

I don't know how Editra manages this, but I think subprocess.Popen() throws an
exception if a command can't run (can't remember for sure), if that's an option.

Original comment by rogerbr...@gmail.com on 14 Nov 2009 at 2:18

GoogleCodeExporter commented 9 years ago
Hi,

Thanks, I see the issue on Windows and POpen does indeed throw an exception in 
this case.

Fix checked in to report the error to the Launch output buffer when a command 
fails
to run.

Original comment by CodyPrec...@gmail.com on 25 Nov 2009 at 4:13

GoogleCodeExporter commented 9 years ago
Great, I'll try it out in the next release.

There's another related issue that may have already fixed: when you click the 
'abort'
button, it immediately switches to 'run', which you can then click before the
previously running program has time to quit. The net result is sometimes the
run/abort buttons get out of sync with what is actually happening.

Regards

Original comment by rogerbr...@gmail.com on 25 Nov 2009 at 7:21