Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
Hdlmake
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
15
Issues
15
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Hdlmake
Commits
a9d91d13
Commit
a9d91d13
authored
Jun 28, 2016
by
Javier D. Garcia-Lasheras
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The 'which' command is not available at Windows command line
parent
b808593d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
env.py
hdlmake/env.py
+5
-1
No files found.
hdlmake/env.py
View file @
a9d91d13
...
...
@@ -27,6 +27,7 @@ import sys
import
platform
from
subprocess
import
Popen
,
PIPE
import
os.path
import
logging
from
.util
import
path
from
.util.termcolor
import
colored
...
...
@@ -81,7 +82,10 @@ class Env(dict):
def
_get_path
(
self
,
name
):
location
=
os
.
popen
(
"which
%
s"
%
name
)
.
read
()
.
strip
()
if
platform
.
system
()
==
'Windows'
:
which_cmd
=
"where"
else
:
which_cmd
=
"which"
location
=
os
.
popen
(
which_cmd
+
"
%
s"
%
name
)
.
read
()
.
split
(
'
\n
'
,
1
)[
0
]
.
strip
()
logging
.
debug
(
"location for
%
s:
%
s"
%
(
name
,
location
))
return
os
.
path
.
dirname
(
location
)
...
...
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