Bug 214101 - [Windows] Fix errors from calls to uname when not available
Summary: [Windows] Fix errors from calls to uname when not available
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Stephan Szabo
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-07-08 15:20 PDT by Stephan Szabo
Modified: 2020-07-08 17:15 PDT (History)
6 users (show)

See Also:


Attachments
Patch (2.54 KB, patch)
2020-07-08 15:49 PDT, Stephan Szabo
darin: review+
Details | Formatted Diff | Diff
Patch (2.51 KB, patch)
2020-07-08 16:35 PDT, Stephan Szabo
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Szabo 2020-07-08 15:20:40 PDT
uname is not something guaranteed available for Windows. Recent updates for calling uname have appeared to cause errors or warnings for commands (build-webkit, check-webkit-style, etc) when used from non-posix shells (like powershell or cmd).
Comment 1 Stephan Szabo 2020-07-08 15:49:05 PDT
Created attachment 403812 [details]
Patch
Comment 2 Darin Adler 2020-07-08 16:25:39 PDT
Comment on attachment 403812 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=403812&action=review

Seems OK

> Tools/Scripts/webkitdirs.pm:365
> -        $output = `uname -m`;
> +        if (!isWindows()) {
> +            $output = `uname -m`;
> +        }

In Perl we would idiomatically write this:

    $output = `uname -m` unless isWindows();

> Tools/Scripts/webkitdirs.pm:369
> +    chomp $output if (defined $output);

No need for those parentheses.
Comment 3 Stephan Szabo 2020-07-08 16:35:50 PDT
Created attachment 403818 [details]
Patch
Comment 4 EWS 2020-07-08 17:14:46 PDT
Committed r264142: <https://trac.webkit.org/changeset/264142>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 403818 [details].
Comment 5 Radar WebKit Bug Importer 2020-07-08 17:15:14 PDT
<rdar://problem/65248364>