Skip to content

Commit ee7afb9

Browse files
committed
Output importmap outdated before anything
1 parent c35e7f7 commit ee7afb9

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ runs:
6161
IMPORTMAP_AUTHOR_EMAIL: ${{ inputs.author-email }}
6262
run: |
6363
bundle install
64-
bundle exec exe/importmap-update 2>&1 | tee "${IMPORTMAP_RUN_LOG:-/dev/null}"
64+
bundle exec exe/importmap-update

exe/importmap-update

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@
2222
# IMPORTMAP_DRY_RUN Set to "true" for a no-side-effects run.
2323
# IMPORTMAP_AUTHOR_NAME Git author name for commits.
2424
# IMPORTMAP_AUTHOR_EMAIL Git author email for commits.
25-
25+
#
26+
Bundler.with_unbundled_env do
27+
Dir.chdir(ENV.fetch("RAILS_ROOT", ".")) do
28+
system("bin/importmap", "outdated")
29+
end
30+
end
2631
$LOAD_PATH.unshift File.expand_path("../lib", __dir__)
2732

2833
require "optparse"
@@ -90,11 +95,7 @@ end
9095

9196
def build_plan_from_live(config, runner)
9297
outdated_result = runner.run("bin/importmap", "outdated")
93-
warn "bin/outdated output"
94-
warn outdated_result.stdout
9598
audit_result = runner.run("bin/importmap", "audit")
96-
warn "bin/audit output"
97-
warn audit_result.stdout
9899
outdated = Importmap::Update::Parsers::OutdatedParser.parse(outdated_result.stdout)
99100
vulnerabilities = Importmap::Update::Parsers::AuditParser.parse(audit_result.stdout)
100101
Importmap::Update::Planner.new(

lib/commands.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ def run(*argv)
4848
opts = {}
4949
opts[:chdir] = @cwd if @cwd
5050
Bundler.with_unbundled_env do
51-
warn "Working directory: #{@cwd.inspect}"
5251
stdout, stderr, status = Open3.capture3(@env, *argv, opts)
5352
Result.new(stdout: stdout, stderr: stderr, exit_code: status.exitstatus)
5453
end

0 commit comments

Comments
 (0)