Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dedal
Manage
Activity
Members
Labels
Plan
Issues
2
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Harbor Registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EBRAINS RI
Tech Hub
Platform
EBRAINS Software Distribution
dedal
Commits
9a8557b7
Commit
9a8557b7
authored
2 weeks ago
by
Jithu Murugan
Browse files
Options
Downloads
Plain Diff
Merge branch 'dev' into VT-70-function-Migrate-Spack-env-setup-into-ESD-repo-with-buildcache
parents
54483bec
2b900989
Branches
VT-70-function-Migrate-Spack-env-setup-into-ESD-repo-with-buildcache
No related tags found
1 merge request
!4
feat(spack_operation): implement setup_spack_env functionality
Pipeline
#60130
passed with stages
in 21 minutes and 54 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dedal/utils/utils.py
+1
-0
1 addition, 0 deletions
dedal/utils/utils.py
with
1 addition
and
0 deletions
dedal/utils/utils.py
+
1
−
0
View file @
9a8557b7
...
@@ -97,6 +97,7 @@ def copy_to_tmp(file_path: Path) -> Path:
...
@@ -97,6 +97,7 @@ def copy_to_tmp(file_path: Path) -> Path:
def
set_bashrc_variable
(
var_name
:
str
,
value
:
str
,
bashrc_path
:
str
=
os
.
path
.
expanduser
(
"
~/.bashrc
"
),
def
set_bashrc_variable
(
var_name
:
str
,
value
:
str
,
bashrc_path
:
str
=
os
.
path
.
expanduser
(
"
~/.bashrc
"
),
logger
:
logging
=
logging
.
getLogger
(
__name__
)):
logger
:
logging
=
logging
.
getLogger
(
__name__
)):
"""
Update or add an environment variable in ~/.bashrc.
"""
"""
Update or add an environment variable in ~/.bashrc.
"""
value
=
value
.
replace
(
"
$
"
,
r
"
\$
"
)
with
open
(
bashrc_path
,
"
r
"
)
as
file
:
with
open
(
bashrc_path
,
"
r
"
)
as
file
:
lines
=
file
.
readlines
()
lines
=
file
.
readlines
()
pattern
=
re
.
compile
(
rf
'
^\s*export\s+
{
var_name
}
=.*$
'
)
pattern
=
re
.
compile
(
rf
'
^\s*export\s+
{
var_name
}
=.*$
'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment