Skip to content

Commit 866ba7d

Browse files
Merge pull request #165 from copiousfreetime/bugfix/164-windows-launching-quotations
ensure the '"' makes it to the commandline
2 parents ef69884 + 79c6de3 commit 866ba7d

7 files changed

Lines changed: 16 additions & 11 deletions

File tree

.semaphore/semaphore.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ blocks:
3131
- 3.1.6
3232
- 3.2.7
3333
- 3.3.7
34-
- 3.4.1
34+
- 3.4.2
3535
- jruby-9.4.12.0
3636
- truffleruby-24.1.2
3737
commands:
@@ -61,7 +61,7 @@ blocks:
6161
- 3.1.6
6262
- 3.2.7
6363
- 3.3.7
64-
- 3.4.1
64+
- 3.4.2
6565
commands:
6666
- source .semaphore/ensure-ruby-version.sh
6767
- source .semaphore/ensure-bundle.sh

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
launchy (3.1.0)
4+
launchy (3.1.1)
55
addressable (~> 2.8)
66
childprocess (~> 5.0)
77
logger (~> 1.6)
@@ -170,7 +170,7 @@ CHECKSUMS
170170
json (2.9.1) sha256=d2bdef4644052fad91c1785d48263756fe32fcac08b96a20bb15840e96550d11
171171
json (2.9.1-java) sha256=88de8c79b54fee6ae1b4854bc48b8d7089f524cbacaf4596df24f86b10896ee8
172172
language_server-protocol (3.17.0.3) sha256=3d5c58c02f44a20d972957a9febe386d7e7468ab3900ce6bd2b563dd910c6b3f
173-
launchy (3.1.0)
173+
launchy (3.1.1)
174174
logger (1.6.5) sha256=c3cfe56d01656490ddd103d38b8993d73d86296adebc5f58cefc9ec03741e56b
175175
minitest (5.25.4) sha256=9cf2cae25ac4dfc90c988ebc3b917f53c054978b673273da1bd20bcb0778f947
176176
minitest-focus (1.4.0) sha256=4cf04bd2b5fe0649922db56f9f2ae30af91475a0f51e02c2baa33f5c5a47ff6c

HISTORY.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# Launchy Changelog
2+
## Version 3.1.1 - 2025-02-21
3+
* Fix the quoted parameter for windows launching - <https://github.com/copiousfreetime/launchy/issues/164>
4+
25
## Version 3.1.0 - 2025-01-23
36
* Fix the argv array when passing to ChildProcess on windows - <https://github.com/copiousfreetime/launchy/issues/159>
47
* Update the ruby test matrix for 3.4

launchy.gemspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# DO NOT EDIT - This file is automatically generated
22
# Make changes to Manifest.txt and/or Rakefile and regenerate
33
# -*- encoding: utf-8 -*-
4-
# stub: launchy 3.1.0 ruby lib
4+
# stub: launchy 3.1.1 ruby lib
55

66
Gem::Specification.new do |s|
77
s.name = "launchy".freeze
8-
s.version = "3.1.0".freeze
8+
s.version = "3.1.1".freeze
99

1010
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
1111
s.metadata = { "bug_tracker_uri" => "https://github.com/copiousfreetime/launchy/issues", "changelog_uri" => "https://github.com/copiousfreetime/launchy/blob/master/HISTORY.md", "homepage_uri" => "https://github.com/copiousfreetime/launchy", "source_code_uri" => "https://github.com/copiousfreetime/launchy" } if s.respond_to? :metadata=
1212
s.require_paths = ["lib".freeze]
1313
s.authors = ["Jeremy Hinegardner".freeze]
1414
s.bindir = "exe".freeze
15-
s.date = "2025-01-23"
15+
s.date = "2025-02-21"
1616
s.description = "Launchy is helper class for launching cross-platform applications in a fire and forget manner. There are application concepts (browser, email client, etc) that are common across all platforms, and they may be launched differently on each platform. Launchy is here to make a common approach to launching external applications from within ruby programs.".freeze
1717
s.email = "jeremy@copiousfreetime.org".freeze
1818
s.executables = ["launchy".freeze]

lib/launchy/applications/browser.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@ def self.handles?(uri)
1616
true if File.exist?(uri.path)
1717
end
1818

19+
# The escaped \\ is necessary so that when shellsplit is done later,
20+
# the "launchy", with quotes, goes through to the commandline, since that
1921
def windows_app_list
20-
['start "launchy" /b']
22+
['start \\"launchy\\" /b']
2123
end
2224

2325
def cygwin_app_list
24-
['cmd /C start "launchy" /b']
26+
['cmd /C start \\"launchy\\" /b']
2527
end
2628

2729
# hardcode this to open?

lib/launchy/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# frozen_string_literal: true
22

33
module Launchy
4-
VERSION = "3.1.0"
4+
VERSION = "3.1.1"
55

66
# Internal: Version number of Launchy
77
module Version

spec/launchy_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
it "opens a local file if we have a drive letter and a valid path on windows" do
8484
uri = "C:#{__FILE__}"
8585
Launchy.open(uri, dry_run: true, host_os: "windows")
86-
_($stdout.string.strip).must_equal "start launchy /b #{uri}"
86+
_($stdout.string.strip).must_equal "start \"launchy\" /b #{uri}"
8787
end
8888

8989
it "opens a data url with a forced browser application" do

0 commit comments

Comments
 (0)