File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 # Load shared agent settings
99 ########
1010
11- instance_eval File . read ( File . join ( File . dirname ( __FILE__ ) , '_shared-agent-settings.rb' ) )
11+ def normalize_windows_path ( path )
12+ return path if path . nil? || path . empty?
13+
14+ # already a native Windows path
15+ return path if path . match? ( /\A [A-Za-z]:[\\ \/ ]/ )
16+
17+ # convert MSYS path like /d/a/repo to D:/a/repo
18+ if path . match? ( %r{\A /([a-zA-Z])/(.*)} )
19+ drive = Regexp . last_match ( 1 ) . upcase
20+ rest = Regexp . last_match ( 2 )
21+ return "#{ drive } :/#{ rest } "
22+ end
23+
24+ path
25+ end
26+
27+ if platform . is_windows? then
28+ instance_eval File . read ( normalize_windows_path ( File . join ( File . dirname ( __FILE__ ) , '_shared-agent-settings.rb' ) ) )
29+ else
30+ instance_eval File . read ( File . join ( File . dirname ( __FILE__ ) , '_shared-agent-settings.rb' ) )
31+ end
1232
1333 ########
1434 # Settings specific to this branch
You can’t perform that action at this time.
0 commit comments