Use working directory if no HOME path specified.
PiperOrigin-RevId: 838680600 Change-Id: I8869da40042bb0b4edcbfe1e626c3188d0631c5e
This commit is contained in:
committed by
Copybara-Service
parent
69179ead48
commit
ea78d83363
@@ -46,9 +46,11 @@ static std::vector<std::byte> LoadAsset(std::string_view path) {
|
||||
|
||||
int main(int argc, char** argv, char** envp) {
|
||||
|
||||
const char* home = getenv("HOME");
|
||||
const std::string ini_path = std::string(home ? home : ".") + "/.mujoco.ini";
|
||||
|
||||
const int width = absl::GetFlag(FLAGS_window_width);
|
||||
const int height = absl::GetFlag(FLAGS_window_height);
|
||||
const std::string ini_path = std::string(getenv("HOME")) + "/.mujoco.ini";
|
||||
mujoco::studio::App app(width, height, ini_path, LoadAsset);
|
||||
|
||||
// If the model file is not specified, try to load it from the first argument
|
||||
|
||||
Reference in New Issue
Block a user