public void UninstallPackage(string packageName) { InstallReceiver receiver = new InstallReceiver(); ExecuteShellCommand($"pm uninstall {packageName}", receiver); if (!string.IsNullOrEmpty(receiver.ErrorMessage)) { throw new PackageInstallationException(receiver.ErrorMessage); } }
public void InstallRemotePackage(string remoteFilePath, bool reinstall) { InstallReceiver receiver = new InstallReceiver(); FileEntry entry = this.FileListingService.FindFileEntry(remoteFilePath); string cmd = string.Format("pm install {1}{0}", entry.FullEscapedPath, reinstall ? "-r " : string.Empty); ExecuteShellCommand(cmd, receiver); if (!string.IsNullOrEmpty(receiver.ErrorMessage)) { throw new PackageInstallationException(receiver.ErrorMessage); } }