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

growlnotify requires different parameters on Windows #253

Closed
agross opened this Issue Feb 26, 2013 · 5 comments

Comments

Projects
None yet
3 participants
@agross
Contributor

agross commented Feb 26, 2013

nanoc's watcher invokes growlnotify with -m <message>. The growlnotify executable on Windows doesn't require the -m parameter (I guess that stands for "message"): growlnotify "the message" is just enough. It might be helpful to add a title, growlnotify /t:nanoc "the message"

Gotta love when developers change command line parameters for different platforms!

@ddfreyne

This comment has been minimized.

Show comment
Hide comment
@ddfreyne

ddfreyne Feb 27, 2013

Member

Hmm, that one is pretty tricky. I unfortunately don’t have Growl anymore, so you could you check something for me? What are the exit statuses for growlnotify --help, -h, /h, --version, … ? I hope there’s something we can infer from the exit statuses whether we’re running a Windows version of growlnotify or not.

If you have any other ideas, do share.

Member

ddfreyne commented Feb 27, 2013

Hmm, that one is pretty tricky. I unfortunately don’t have Growl anymore, so you could you check something for me? What are the exit statuses for growlnotify --help, -h, /h, --version, … ? I hope there’s something we can infer from the exit statuses whether we’re running a Windows version of growlnotify or not.

If you have any other ideas, do share.

@agross

This comment has been minimized.

Show comment
Hide comment
@agross

agross Feb 27, 2013

Contributor

What about using the usual platform switch? RUBY_PLATFORM =~ /mswin|mingw/
as far as I know.

I'll let you know about the exit codes as soon as I'm back at a computer.

Alex

Alexander Groß
Tiny phone, tiny mail
On Feb 27, 2013 10:33 PM, "Denis Defreyne" notifications@github.com wrote:

Hmm, that one is pretty tricky. I unfortunately don’t have Growl anymore,
so you could you check something for me? What are the exit statuses for growlnotify
--help, -h, growlnotify --version, /h, … ? I hope there’s something we
can infer from the exit statuses whether we’re running a Windows version of
growlnotify or not.

If you have any other ideas, do share.


Reply to this email directly or view it on GitHubhttps://github.com/nanoc/nanoc/issues/253#issuecomment-14201517
.

Contributor

agross commented Feb 27, 2013

What about using the usual platform switch? RUBY_PLATFORM =~ /mswin|mingw/
as far as I know.

I'll let you know about the exit codes as soon as I'm back at a computer.

Alex

Alexander Groß
Tiny phone, tiny mail
On Feb 27, 2013 10:33 PM, "Denis Defreyne" notifications@github.com wrote:

Hmm, that one is pretty tricky. I unfortunately don’t have Growl anymore,
so you could you check something for me? What are the exit statuses for growlnotify
--help, -h, growlnotify --version, /h, … ? I hope there’s something we
can infer from the exit statuses whether we’re running a Windows version of
growlnotify or not.

If you have any other ideas, do share.


Reply to this email directly or view it on GitHubhttps://github.com/nanoc/nanoc/issues/253#issuecomment-14201517
.

@bobthecow

This comment has been minimized.

Show comment
Hide comment
@bobthecow

bobthecow Feb 27, 2013

Member
!!(RUBY_PLATFORM =~ /(mingw|bccwin|wince|mswin32)/i)
Member

bobthecow commented Feb 27, 2013

!!(RUBY_PLATFORM =~ /(mingw|bccwin|wince|mswin32)/i)
@agross

This comment has been minimized.

Show comment
Hide comment
@agross

agross Feb 27, 2013

Contributor
>growlnotify --help
Notification sent successfully
Notification sent successfully

>echo %errorlevel%
0

>growlnotify /h OR /help OR /version
Bad arguments : Index was outside the bounds of the array.

>echo %errorlevel%
-1

C:\Tools\Growl
>growlnotify /?
...
>echo %errorlevel%
0
Contributor

agross commented Feb 27, 2013

>growlnotify --help
Notification sent successfully
Notification sent successfully

>echo %errorlevel%
0

>growlnotify /h OR /help OR /version
Bad arguments : Index was outside the bounds of the array.

>echo %errorlevel%
-1

C:\Tools\Growl
>growlnotify /?
...
>echo %errorlevel%
0
@ddfreyne

This comment has been minimized.

Show comment
Hide comment
@ddfreyne

ddfreyne Feb 28, 2013

Member

Hmm, looks like there’s no good way to figure out which kind of growlnotify is running.

I think just checking RUBY_PLATFORM should be okay.

Member

ddfreyne commented Feb 28, 2013

Hmm, looks like there’s no good way to figure out which kind of growlnotify is running.

I think just checking RUBY_PLATFORM should be okay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment