mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[rubygems/rubygems] Move comment below shebang in bin/console template
In an executable script, the shebang line should be the first line (the file needs to start with the bytes 0x23 0x21). Putting a comment above it will break the script. (Regression test included per @deivid-rodriguez) https://github.com/rubygems/rubygems/commit/962e669feb
This commit is contained in:
parent
18c642da86
commit
8863bfb1f4
Notes:
git
2020-09-28 14:54:52 +09:00
2 changed files with 3 additions and 2 deletions
|
@ -1,6 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
#!/usr/bin/env ruby
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "bundler/setup"
|
||||
require "<%= config[:namespaced_path] %>"
|
||||
|
|
|
@ -376,6 +376,8 @@ RSpec.describe "bundle gem" do
|
|||
expect(bundled_app("#{gem_name}/bin/console")).to exist
|
||||
expect(bundled_app("#{gem_name}/bin/setup")).to be_executable
|
||||
expect(bundled_app("#{gem_name}/bin/console")).to be_executable
|
||||
expect(bundled_app("#{gem_name}/bin/setup").read).to start_with("#!")
|
||||
expect(bundled_app("#{gem_name}/bin/console").read).to start_with("#!")
|
||||
end
|
||||
|
||||
it "starts with version 0.1.0" do
|
||||
|
|
Loading…
Add table
Reference in a new issue