Skip to content

Commit

Permalink
Fix ApkActionsBuilder.java on Windows
Browse files Browse the repository at this point in the history
resource_extractor needs PATH to be set on Windows, otherwise it throws:

Traceback (most recent call last):
  File "C:\Program Files\Anaconda3\lib\site.py", line 570, in <module>
    main()
  File "C:\Program Files\Anaconda3\lib\site.py", line 561, in main
    os.environ["PATH"])
  File "C:\Program Files\Anaconda3\lib\os.py", line 725, in __getitem__
    raise KeyError(key) from None
KeyError: 'PATH'
Target //tensorflow/contrib/lite/examples/android:tflite_demo failed to build

Working towards: #4148

RELNOTES: None.
PiperOrigin-RevId: 211324206
  • Loading branch information
meteorcloudy authored and Copybara-Service committed Sep 3, 2018
1 parent 30381dd commit a5a9fbb
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ private void buildApk(RuleContext ruleContext, Artifact outApk) {
.addExecPath(javaResourceZip)
.addExecPath(extractedJavaResourceZip)
.build())
.useDefaultShellEnvironment()
.build(ruleContext));

if (ruleContext.getFragment(AndroidConfiguration.class).compressJavaResources()) {
Expand Down

0 comments on commit a5a9fbb

Please sign in to comment.