Explicitly require system_command in cmds

This commit is contained in:
Douglas Eichelberger
2024-01-31 11:52:00 -08:00
parent b5d0c5655d
commit 0cc6c09f16
2 changed files with 11 additions and 1 deletions
+6
View File
@@ -1,6 +1,12 @@
# frozen_string_literal: true
require "system_command"
module ChangedFiles
# TODO: replace with public API like Utils.safe_popen_read that's less likely to be volatile to changes
# see https://github.com/Homebrew/brew/pull/16540#issuecomment-1913737000
include SystemCommand::Mixin
def changed_files
commit_range_start = system_command!("git", args: ["rev-parse", "origin"], chdir: path).stdout.chomp
commit_range_end = system_command!("git", args: ["rev-parse", "HEAD"], chdir: path).stdout.chomp
+5 -1
View File
@@ -1,12 +1,16 @@
# typed: false
# frozen_string_literal: true
require "forwardable"
require "system_command"
APPLE_LAUNCHJOBS_REGEX =
/\A(?:application\.)?com\.apple\.(installer|Preview|Safari|systemevents|systempreferences|Terminal)(?:\.|$)/
module Check
# TODO: replace with public API like Utils.safe_popen_read that's less likely to be volatile to changes
# see https://github.com/Homebrew/brew/pull/16540#issuecomment-1913737000
extend SystemCommand::Mixin
CHECKS = {
installed_apps: lambda {
["/Applications", File.expand_path("~/Applications")]