Coder Social home page Coder Social logo

Comments (6)

copiousfreetime avatar copiousfreetime commented on August 20, 2024

if you change that to Launchy.open("http://google.com/?q=launchy's+great", :dry_run => true) then it should output the exact parameters that were sent to system(). My initial thought is that the system call itself is wrapping the parameter in quotes, as it I don't think Launchy is.

If you can do that along with the debug, that should add some additional help. I don't have a windows machine to do this testing on, so all my windows fixing is done by generous folks like yourself.

Does start have the same syntax in all versions of windows? Could the possibility exist that there are slight differences between windows versions that i'll need to check?

from launchy.

copiousfreetime avatar copiousfreetime commented on August 20, 2024

The other item to possibly check is the use of #shellsplit in https://github.com/copiousfreetime/launchy/blob/master/lib/launchy/detect/runner.rb#L85. If you change that to just #split does everything work just fine?

from launchy.

schmich avatar schmich commented on August 20, 2024

My initial thought is that the system call itself is wrapping the parameter in quotes, as it I don't think Launchy is.

You're right. Looking at the documentation for system, the call behaves differently depending on the arguments specified.

The array version used in Launchy in runner.rb allows the system call to manipulate the command-line arguments. Using Process Monitor, I verified that the URL argument was indeed quoted.

Ultimately, I think we just have to appease start's unfortunate command-line syntax. I think the right fix here is to always specify the command in the form of cmd /c start /b "" "http://google.com/?q=launchy's+great" since the URL argument might have spaces and might need to be quoted anyway.

I'll submit a fix when I get the chance and ensure that this is the right behavior for all supported versions of Windows.

from launchy.

copiousfreetime avatar copiousfreetime commented on August 20, 2024

Excellent, and don't forget to add yourself to CONTRIBUTING.md

from launchy.

copiousfreetime avatar copiousfreetime commented on August 20, 2024

Hi @schmich checking in to see if you ever created a patch for this issue.

from launchy.

copiousfreetime avatar copiousfreetime commented on August 20, 2024

version 2.4.0 released which I hope fixes this. If you can, please verify.

from launchy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.