Skip to content

Commit

Permalink
Zen will now upload the user selected pax if they have selected that …
Browse files Browse the repository at this point in the history
…installation type option. Add conditionals to current download and upload operations

Signed-off-by: Timothy Gerstel <[email protected]>
  • Loading branch information
timgerstel committed Sep 13, 2023
1 parent 6d8c733 commit acac3ee
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/actions/InstallationHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Installation {

public async runInstallation (
connectionArgs: IIpcConnectionArgs,
installationArgs: {installationDir: string, installationType: string},
installationArgs: {installationDir: string, installationType: string, userUploadedPaxPath: string},
version: string
): Promise<IResponse> {

Expand All @@ -43,7 +43,13 @@ class Installation {
}

console.log("uploading...");
const upload = await this.uploadPax(connectionArgs, installationArgs.installationDir);
let upload;
if(installationArgs.installationType === "upload"){
//upload the PAX the user selected in the "Install Type" stage to the installation dir (from the planning stage)
upload = await new FileTransfer().upload(connectionArgs, installationArgs.userUploadedPaxPath, path.join(installationArgs.installationDir, "zowe.pax"), DataType.BINARY)
} else if (installationArgs.installationType === "download"){
upload = await this.uploadPax(connectionArgs, installationArgs.installationDir);
}
ProgressStore.set('installation.upload', upload.status);

console.log("unpaxing...");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ interface InstallationState {
installationDir: string;
installationType?: string;
downloadDir: string;
userUploadedPaxPath?: string;
smpeDir?: string;
javaHome: string;
nodeHome: string;
Expand All @@ -30,6 +31,7 @@ const initialState: InstallationState = {
installationArgs: {
installationDir: '',
installationType: 'download',
userUploadedPaxPath: '',
smpeDir: '',
downloadDir: '',
javaHome: '',
Expand Down

0 comments on commit acac3ee

Please sign in to comment.