Allow increasing main storage size (sdcard is separate storage) (#219)

* Allow increasing disk size - Issue #184

* Fix checkDiskSize validator

* Fix lint errors

* Size modifier without a number is unacceptable

"G" is not the same as "1G"

* Implement checkDiskSize validator tests
This commit is contained in:
Vilius Sutkus '89
2022-02-05 07:07:40 +02:00
committed by GitHub
parent 62d97062b0
commit 4e0dd2c343
6 changed files with 83 additions and 1 deletions
+7 -1
View File
@@ -10,7 +10,8 @@ import {
checkDisableLinuxHardwareAcceleration,
checkForceAvdCreation,
checkChannel,
checkEnableHardwareKeyboard
checkEnableHardwareKeyboard,
checkDiskSize
} from './input-validator';
import { launchEmulator, killEmulator } from './emulator-manager';
import * as exec from '@actions/exec';
@@ -63,6 +64,10 @@ async function run() {
const sdcardPathOrSize = core.getInput('sdcard-path-or-size');
console.log(`SD card path or size: ${sdcardPathOrSize}`);
const diskSize = core.getInput('disk-size');
checkDiskSize(diskSize);
console.log(`Disk size: ${diskSize}`);
// custom name used for creating the AVD
const avdName = core.getInput('avd-name');
console.log(`AVD name: ${avdName}`);
@@ -156,6 +161,7 @@ async function run() {
cores,
ramSize,
sdcardPathOrSize,
diskSize,
avdName,
forceAvdCreation,
emulatorOptions,