mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Check for PROMPT
This commit is contained in:
+12
-5
@@ -183,7 +183,9 @@ gb_internal bool try_copy_executable_from_cache(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if !defined(GB_SYSTEM_WINDOWS)
|
||||||
|
extern char **environ;
|
||||||
|
#endif
|
||||||
|
|
||||||
// returns false if different, true if it is the same
|
// returns false if different, true if it is the same
|
||||||
gb_internal bool try_cached_build(Checker *c, Array<String> const &args) {
|
gb_internal bool try_cached_build(Checker *c, Array<String> const &args) {
|
||||||
@@ -244,15 +246,20 @@ gb_internal bool try_cached_build(Checker *c, Array<String> const &args) {
|
|||||||
if (string_starts_with(str, str_lit("CURR_DATE_TIME="))) {
|
if (string_starts_with(str, str_lit("CURR_DATE_TIME="))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (string_starts_with(str, str_lit("PROMPT="))) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
array_add(&envs, str);
|
array_add(&envs, str);
|
||||||
}
|
}
|
||||||
#elif defined(GB_SYSTEM_LINUX)
|
#else
|
||||||
char **curr_env = environ;
|
char **curr_env = environ;
|
||||||
while (curr_env && *curr_env) {
|
while (curr_env && *curr_env) {
|
||||||
array_add(&envs, make_string_c(*curr_env++));
|
String str = make_string_c(*curr_env++);
|
||||||
|
if (string_starts_with(str, str_lit("PROMPT="))) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
array_add(&envs, str);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
// TODO(bill): environment variables on all other platforms
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
array_sort(envs, string_cmp);
|
array_sort(envs, string_cmp);
|
||||||
|
|||||||
Reference in New Issue
Block a user