mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Only write version information on real robot (#1510)
Writing to the versions file throws an exception on Windows, and might write weird files on Linux.
This commit is contained in:
committed by
Peter Johnson
parent
8ac4b113a5
commit
d817001259
@@ -98,13 +98,15 @@ RobotBase::RobotBase() : m_ds(DriverStation::GetInstance()) {
|
||||
|
||||
SmartDashboard::init();
|
||||
|
||||
std::FILE* file = nullptr;
|
||||
file = std::fopen("/tmp/frc_versions/FRC_Lib_Version.ini", "w");
|
||||
if (IsReal()) {
|
||||
std::FILE* file = nullptr;
|
||||
file = std::fopen("/tmp/frc_versions/FRC_Lib_Version.ini", "w");
|
||||
|
||||
if (file != nullptr) {
|
||||
std::fputs("C++ ", file);
|
||||
std::fputs(GetWPILibVersion(), file);
|
||||
std::fclose(file);
|
||||
if (file != nullptr) {
|
||||
std::fputs("C++ ", file);
|
||||
std::fputs(GetWPILibVersion(), file);
|
||||
std::fclose(file);
|
||||
}
|
||||
}
|
||||
|
||||
// First and one-time initialization
|
||||
|
||||
Reference in New Issue
Block a user