Commit ad96ddd0 authored by Cassandra Watergate's avatar Cassandra Watergate Committed by GitHub

fix directory already exists error (#5600)

* fix directory already exists error

* crew: rubyize /dev/urandom

* lib.const.rb: bump crew version
Co-authored-by: default avatarEd Reel <edreel@gmail.com>
parent c92e268c
...@@ -10,6 +10,7 @@ require 'uri' ...@@ -10,6 +10,7 @@ require 'uri'
require 'digest/sha2' require 'digest/sha2'
require 'json' require 'json'
require 'fileutils' require 'fileutils'
require 'securerandom'
require_relative 'lib/const' require_relative 'lib/const'
require_relative 'lib/util' require_relative 'lib/util'
...@@ -588,7 +589,7 @@ def download ...@@ -588,7 +589,7 @@ def download
end end
def unpack (meta) def unpack (meta)
extract_dir = meta[:filename] + '.dir' extract_dir = meta[:filename] + '.' + SecureRandom.alphanumeric(8) + '.dir'
target_dir = nil target_dir = nil
Dir.chdir CREW_BREW_DIR do Dir.chdir CREW_BREW_DIR do
FileUtils.mkdir_p extract_dir, verbose: @fileutils_verbose FileUtils.mkdir_p extract_dir, verbose: @fileutils_verbose
......
# Defines common constants used in different parts of crew # Defines common constants used in different parts of crew
CREW_VERSION = '1.8.2' CREW_VERSION = '1.8.3'
ARCH_ACTUAL = `uname -m`.strip ARCH_ACTUAL = `uname -m`.strip
# This helps with virtualized builds on aarch64 machines # This helps with virtualized builds on aarch64 machines
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment