Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
e806e264
Commit
e806e264
authored
Oct 17, 2018
by
Ash McKenzie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename tmp_netrc_directory to tmp_home_dir
parent
da8a319e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
qa/qa/git/repository.rb
qa/qa/git/repository.rb
+6
-5
No files found.
qa/qa/git/repository.rb
View file @
e806e264
...
...
@@ -18,7 +18,8 @@ module QA
# We set HOME to the current working directory (which is a
# temporary directory created in .perform()) so the temporarily dropped
# .netrc can be utilised
self
.
env_vars
=
[
%Q{HOME="
#{
File
.
dirname
(
netrc_file_path
)
}
"}
]
self
.
env_vars
=
[
%Q{HOME="
#{
tmp_home_dir
}
"}
]
@use_lfs
=
false
end
def
self
.
perform
(
*
args
)
...
...
@@ -158,12 +159,12 @@ module QA
end
end
def
tmp_
netrc_directory
@tmp_
netrc_directory
||=
File
.
join
(
Dir
.
tmpdir
,
"qa-netrc-credentials"
,
$$
.
to_s
)
def
tmp_
home_dir
@tmp_
home_dir
||=
File
.
join
(
Dir
.
tmpdir
,
"qa-netrc-credentials"
,
$$
.
to_s
)
end
def
netrc_file_path
@netrc_file_path
||=
File
.
join
(
tmp_
netrc_directory
,
'.netrc'
)
@netrc_file_path
||=
File
.
join
(
tmp_
home_dir
,
'.netrc'
)
end
def
netrc_content
...
...
@@ -185,7 +186,7 @@ module QA
#
return
if
netrc_already_contains_content?
FileUtils
.
mkdir_p
(
tmp_
netrc_directory
)
FileUtils
.
mkdir_p
(
tmp_
home_dir
)
File
.
open
(
netrc_file_path
,
'a'
)
{
|
file
|
file
.
puts
(
netrc_content
)
}
File
.
chmod
(
0600
,
netrc_file_path
)
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment