On Wed, Mar 24, 2021 at 10:42:14AM +0800, Wu Zhende wrote:
[Error] can't load such file "../lib/mq_client"
[How] use absolute path
Signed-off-by: Wu Zhende wuzhende666@163.com
providers/docker/docker.rb | 4 +++- providers/multi-qemu | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/providers/docker/docker.rb b/providers/docker/docker.rb index 9d6854f..b372a11 100755 --- a/providers/docker/docker.rb +++ b/providers/docker/docker.rb @@ -3,12 +3,14 @@ # Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved. # frozen_string_literal: true
+CCI_SRC = ENV['CCI_SRC'] || File.dirname(File.dirname(File.realpath($PROGRAM_NAME)))
require 'open-uri' require 'json' require 'set' require 'fileutils'
-require '../lib/mq_client' +require "#{CCI_SRC}/lib/mq_client" require_relative '../../container/defconfig'
If you use absolute path, why not change all above to absolute path? One is absolute path, another is relative, that's strange.
Thanks, Yuanchao