apache / cordova-lib

Apache Cordova Tooling Library
https://cordova.apache.org/
Apache License 2.0
221 stars 242 forks source link

fix: platform add with tarball #918

Closed erisu closed 1 year ago

erisu commented 1 year ago

Platforms affected

n/a

Motivation and Context

Fix installing platforms with tarball.

cordova platform add cordova platform add ../cordova-android-12.0.0.tgz will append @latest to the end and causes install failures.

Description

Only append @latest to only platforms that are known.

Testing

npm t

Checklist

codecov-commenter commented 1 year ago

Codecov Report

Merging #918 (ee558de) into master (1979863) will decrease coverage by 0.02%. The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #918      +/-   ##
==========================================
- Coverage   87.94%   87.92%   -0.02%     
==========================================
  Files          46       46              
  Lines        2132     2129       -3     
==========================================
- Hits         1875     1872       -3     
  Misses        257      257              
Impacted Files Coverage Δ
src/cordova/platform/addHelper.js 95.83% <ø> (-0.09%) :arrow_down:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more