-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update build.py #11
base: master
Are you sure you want to change the base?
Update build.py #11
Conversation
Signed-off-by: David Wertenteil <[email protected]>
Signed-off-by: David Wertenteil <[email protected]>
Signed-off-by: David Wertenteil <[email protected]>
Signed-off-by: David Wertenteil <[email protected]>
Signed-off-by: David Wertenteil <[email protected]>
Preparing review... |
PR Analysis
PR Feedback
How to use
|
/improve |
@@ -47,7 +47,7 @@ def main(): | |||
client_var = "github.com/kubescape/kubescape/v2/core/cautils.Client" | |||
client_name = os.getenv("CLIENT") | |||
|
|||
# Create build directory | |||
# Create the build directory | |||
build_dir = get_build_dir() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: Add error handling for the get_build_dir()
function
build_dir = get_build_dir() | |
try: | |
build_dir = get_build_dir() | |
except Exception as e: | |
print(f'Error getting build directory: {e}') |
@@ -47,7 +47,7 @@ def main(): | |||
client_var = "github.com/kubescape/kubescape/v2/core/cautils.Client" | |||
client_name = os.getenv("CLIENT") | |||
|
|||
# Create build directory | |||
# Create the build directory | |||
build_dir = get_build_dir() | |||
|
|||
ks_file = os.path.join(build_dir, package_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: Use os.path.join()
for concatenating file paths
ks_file = os.path.join(build_dir, package_name) | |
ks_file = os.path.join(build_dir, package_name) |
@@ -47,7 +47,7 @@ def main(): | |||
client_var = "github.com/kubescape/kubescape/v2/core/cautils.Client" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: Remove unused variable client_var
client_var = "github.com/kubescape/kubescape/v2/core/cautils.Client" |
@@ -47,7 +47,7 @@ def main(): | |||
client_var = "github.com/kubescape/kubescape/v2/core/cautils.Client" | |||
client_name = os.getenv("CLIENT") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: Remove unused variable client_name
client_name = os.getenv("CLIENT") |
c150614
to
addd66b
Compare
Overview