diff --git a/commands/check.rb b/commands/check.rb index 22ed61b1b..00ddd8a5d 100644 --- a/commands/check.rb +++ b/commands/check.rb @@ -15,10 +15,13 @@ class Command crew_package_test_path = File.join(CREW_LIB_PATH, 'tests', 'package', name[0].to_s) crew_package_test = File.join(crew_package_test_path, name) + # This pulls the operation from the calling function. + operation = caller_locations(1, 2)[0].to_s.split[3].split('_')[0].split('#')[1] + # We return true here in order to exit early but behave as if the check passed, so that other operations can continue. unless File.file?(local_package) # If the operation is a bare 'crew check', then we don't want to silently skip it. - puts 'No local package file found, skipping check.'.lightred if caller_locations(1, 2)[0].to_s.split[3].split('_')[0].split('#')[1].to_s == 'check' + puts 'No local package file found, skipping check.'.lightred if operation == 'check' return true end @@ -42,9 +45,6 @@ class Command to_copy_test = force to_copy_filelist = force - # This pulls the operation from the calling function. - operation = caller_locations(1, 2)[0].to_s.split[3].split('_')[0].split('#')[1] - # Prompt to copy the local repo package to crew if the package is not found. if !force && File.file?(local_package) && !File.file?(crew_package) puts "The crew package #{crew_package} does not exist.".yellow diff --git a/lib/const.rb b/lib/const.rb index 9f4587862..e48ab1053 100644 --- a/lib/const.rb +++ b/lib/const.rb @@ -4,7 +4,7 @@ require 'etc' require 'open3' OLD_CREW_VERSION = defined?(CREW_VERSION) ? CREW_VERSION : '1.0' -CREW_VERSION = '1.70.0' unless defined?(CREW_VERSION) && CREW_VERSION == OLD_CREW_VERSION +CREW_VERSION = '1.70.1' unless defined?(CREW_VERSION) && CREW_VERSION == OLD_CREW_VERSION # Kernel architecture. KERN_ARCH = Etc.uname[:machine] diff --git a/tests/library_test b/tests/library_test index f5844a31d..d381c0a6f 100755 --- a/tests/library_test +++ b/tests/library_test @@ -31,17 +31,17 @@ def check_libraries(pkg_path, verbose: false) else valid_libraries = `grep -E "^#{CREW_LIB_PREFIX}/" "#{filelist}" | grep -vE "^#{CREW_PREFIX}/libexec/" | grep -vE "^#{CREW_PREFIX}/lib/perl" | grep -vE "^#{CREW_PREFIX}/lib/python"`.chomp if valid_libraries.empty? - puts 'All libraries:' - puts libraries - puts 'Invalid library paths.'.lightred + puts 'Invalid libraries:'.lightred + puts libraries.lightred puts "Library test for #{name} failed.".lightred return 1 elsif libraries != valid_libraries - puts 'All libraries:' - puts libraries - puts 'Valid libraries:' - puts valid_libraries - puts 'Invalid library paths.'.lightred + libraries_array = libraries.split("\n") + valid_libraries_array = valid_libraries.split("\n") + invalid_libraries_array = libraries_array - valid_libraries_array + invalid_libraries = invalid_libraries_array.join("\n") + puts 'Invalid libraries:'.lightred + puts invalid_libraries.lightred puts "Library test for #{name} failed.".lightred return 1 else