Skip to content

Commit

Permalink
Merge pull request #4215 from dependabot/brrygrdn/dry-run-requires-de…
Browse files Browse the repository at this point in the history
…v-shell

bin/dry-run.rb requires a development container to run
  • Loading branch information
brrygrdn authored Sep 10, 2021
2 parents 481a2cd + 8aae45a commit 9311442
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,13 @@ $ bin/docker-dev-shell

### Dry run script

*Note: you must have run `bundle install` in the `omnibus` directory before
running this script.*

You can use the "dry-run" script to simulate a dependency update job, printing
the diff that would be generated to the terminal. It takes two positional
arguments: the package manager and the GitHub repo name (including the
account):

```bash
$ cd omnibus && bundle install && cd -
$ bin/docker-dev-shell
$ bin/dry-run.rb go_modules rsc/quote
=> fetching dependency files
=> parsing dependency files
Expand Down
10 changes: 10 additions & 0 deletions bin/dry-run.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@

# rubocop:disable Style/GlobalVars

require "etc"
unless Etc.getpwuid(Process.uid).name == "dependabot"
puts <<~INFO
bin/dry-run.rb is only supported in a developerment container.
Please use bin/docker-dev-shell first.
INFO
exit 1
end

$LOAD_PATH << "./bundler/lib"
$LOAD_PATH << "./cargo/lib"
$LOAD_PATH << "./common/lib"
Expand Down

0 comments on commit 9311442

Please sign in to comment.