mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Fix tix-build considering empty strings as valid target triplets.
This commit is contained in:
parent
57cd616f59
commit
b2addd979c
1 changed files with 7 additions and 0 deletions
|
@ -859,6 +859,13 @@ int main(int argc, char* argv[])
|
|||
if ( !minfo.package_dir )
|
||||
error(1, errno, "canonicalize_file_name: `%s'", argv[1]);
|
||||
|
||||
if ( minfo.build && !minfo.build[0] )
|
||||
free(minfo.build), minfo.build = NULL;
|
||||
if ( minfo.host && !minfo.host[0] )
|
||||
free(minfo.host), minfo.host = NULL;
|
||||
if ( minfo.target && !minfo.target[0] )
|
||||
free(minfo.target), minfo.target = NULL;
|
||||
|
||||
if ( !minfo.build && !(minfo.build = GetBuildTriplet()) )
|
||||
error(1, errno, "unable to determine build, use --build or BUILD");
|
||||
if ( !minfo.host && !(minfo.host = strdup_null(getenv("HOST"))) )
|
||||
|
|
Loading…
Reference in a new issue