Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.devtools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.devtools
Commits
0a7a6e7b
Commit
0a7a6e7b
authored
4 years ago
by
Amir MOHAMMADI
Browse files
Options
Downloads
Patches
Plain Diff
[ci][check] correctly change the cwd before running pre-commit
parent
3938a7f4
No related branches found
No related tags found
1 merge request
!213
Fix nightlies commands
Pipeline
#49211
passed
4 years ago
Stage: build
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
bob/devtools/bootstrap.py
+2
-1
2 additions, 1 deletion
bob/devtools/bootstrap.py
bob/devtools/scripts/ci.py
+1
-1
1 addition, 1 deletion
bob/devtools/scripts/ci.py
with
3 additions
and
2 deletions
bob/devtools/bootstrap.py
+
2
−
1
View file @
0a7a6e7b
...
...
@@ -89,7 +89,7 @@ def human_time(seconds, granularity=2):
return
"
,
"
.
join
([
x
for
x
in
result
[:
granularity
]
if
x
is
not
None
])
def
run_cmdline
(
cmd
,
env
=
None
):
def
run_cmdline
(
cmd
,
env
=
None
,
**
kwargs
):
"""
Runs a command on a environment, logs output and reports status.
Parameters:
...
...
@@ -114,6 +114,7 @@ def run_cmdline(cmd, env=None):
env
=
env
,
bufsize
=
1
,
universal_newlines
=
True
,
**
kwargs
,
)
for
line
in
iter
(
p
.
stdout
.
readline
,
""
):
...
...
This diff is collapsed.
Click to expand it.
bob/devtools/scripts/ci.py
+
1
−
1
View file @
0a7a6e7b
...
...
@@ -1023,6 +1023,6 @@ def check(root):
try
:
backup
=
os
.
environ
.
get
(
"
SKIP
"
,
""
)
os
.
environ
[
"
SKIP
"
]
=
"
sphinx-build,sphinx-doctest
"
run_cmdline
([
"
python
"
,
"
-m
"
,
"
pre_commit
"
,
"
run
"
,
"
--all-files
"
])
run_cmdline
([
"
python
"
,
"
-m
"
,
"
pre_commit
"
,
"
run
"
,
"
--all-files
"
]
,
cwd
=
root
)
finally
:
os
.
environ
[
"
SKIP
"
]
=
backup
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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