Skip to content

Commit 4e2a328

Browse files
author
Kevin Paulisse
committed
Allow bootstrap script to be an absolute path if it starts with '/'
1 parent d624dcc commit 4e2a328

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

lib/octocatalog-diff/catalog-util/bootstrap.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,11 @@ def self.git_checkout(logger, dir_opts)
116116
# @param opts [Hash] Directory options
117117
def self.install_bootstrap_script(logger, opts)
118118
# Verify that bootstrap file exists
119-
src = File.join(opts[:basedir], opts[:bootstrap_script])
119+
src = if opts[:bootstrap_script].start_with? '/'
120+
opts[:bootstrap_script]
121+
else
122+
File.join(opts[:basedir], opts[:bootstrap_script])
123+
end
120124
raise BootstrapError, "Bootstrap script #{src} does not exist" unless File.file?(src)
121125

122126
logger.debug('Begin install bootstrap script in target directory')

0 commit comments

Comments
 (0)