-
-
Notifications
You must be signed in to change notification settings - Fork 120
feat: support env configs as option in bpftime cli tool #378
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
base: master
Are you sure you want to change the base?
Conversation
@Officeyutong can you please help with passing the failing actions. |
|
||
static std::pair<std::string, std::vector<std::string> > | ||
static std::tuple<std::string, std::vector<std::string>, std::vector<const char *>> | ||
extract_path_and_args(const argparse::ArgumentParser &parser) |
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.
The function name might need to be changed
log_path_string += log_path; | ||
env_args.push_back(log_path_string.c_str()); | ||
} | ||
if (parser.get<bool>("--allow-enternal-maps")) { |
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.
enternal
? typo?
const char *disable_jit_str = "BPFTIME_DISABLE_JIT=true"; | ||
env_args.push_back(disable_jit_str); | ||
} | ||
if (parser.get<bool>("--run-wit-kernel")) { |
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.
typo?
try { | ||
items = parser.get<std::vector<std::string> >("COMMAND"); | ||
|
||
if (parser.is_subcommand_used("load") || parser.is_subcommand_used("start")) { |
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.
extract_path_and_args
is receiving a sub parser, not the full parser. So there is no sub commands under it, and these parser.is_subcommand_used
calls will always throw exception
Reviewed |
Thanks @Officeyutong, will resolve them. |
cbcb1e9
to
20acd88
Compare
Description
Fixes #331
Type of change
How Has This Been Tested?
Test Configuration:
Checklist