Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

&run doesn't fail() when it fails in Rakudo #3062

Closed
p6rt opened this issue Mar 4, 2013 · 4 comments
Closed

&run doesn't fail() when it fails in Rakudo #3062

p6rt opened this issue Mar 4, 2013 · 4 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Mar 4, 2013

Migrated from rt.perl.org#117039 (status was 'resolved')

Searchable as RT117039$

@p6rt
Copy link
Author

p6rt commented Mar 4, 2013

From @masak

<masak> I should probably use &shell instead of &run in my program, but...
<masak> ...when I use &run, there's no indication at all that things
go wrong. no error. nothing.
<masak> like 'run("echo hi")'
<masak> "On failure to execute, the routines C<fail()>." -- so, since
I use &run in sink context, it should blow up, right?
* masak submits rakudobug

$ nom -e 'say run("this command cannot possibly succeed").WHAT'
Int+{<anon>}()
$ nom -e 'say +run("this command cannot possibly succeed")'
255
$ nom -e 'say ?run("this command cannot possibly succeed")'
False

Yeah, yeah, it's an Int with Bool tendencies. Cute. But this goes
against the above sentence from S29.

@p6rt
Copy link
Author

p6rt commented Nov 5, 2015

From @jnthn

On Mon Mar 04 08​:33​:55 2013, masak wrote​:

<masak> I should probably use &shell instead of &run in my program, but...
<masak> ...when I use &run, there's no indication at all that things
go wrong. no error. nothing.
<masak> like 'run("echo hi")'
<masak> "On failure to execute, the routines C<fail()>." -- so, since
I use &run in sink context, it should blow up, right?
* masak submits rakudobug

$ nom -e 'say run("this command cannot possibly succeed").WHAT'
Int+{<anon>}()
$ nom -e 'say +run("this command cannot possibly succeed")'
255
$ nom -e 'say ?run("this command cannot possibly succeed")'
False

Yeah, yeah, it's an Int with Bool tendencies. Cute. But this goes
against the above sentence from S29.

Today, run and shell always return a Proc, whose exitcode property indicates success or failure. In sink context, an unsuccessful Proc will now throw an exception. Design docs updated to indicate this, and tests cover it in S29-os/system.t.

/jnthn

@p6rt
Copy link
Author

p6rt commented Nov 5, 2015

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Nov 5, 2015

@jnthn - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Nov 5, 2015
@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant