Skip to content

Commit

Permalink
(chocolateyGH-641) add temp location
Browse files Browse the repository at this point in the history
And be able to replace that token as well.
  • Loading branch information
ferventcoder committed May 24, 2016
1 parent fbe24a8 commit 72ab767
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/chocolatey/infrastructure.app/domain/InstallTokens.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ public static class InstallTokens
public const string PACKAGE_LOCATION = "{{PACKAGE_LOCATION}}";
public const string LANGUAGE = "{{LANGUAGE}}";
public const string UNINSTALLER_LOCATION = "{{UNINSTALLER_LOCATION}}";
public const string TEMP_LOCATION = "{{TEMP_LOCATION}}";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,11 @@ public void run(PackageResult packageResult, ChocolateyConfiguration config)
uninstallArgs += " " + installer.build_uninstall_command_arguments();
}

var logLocation = _fileSystem.combine_paths(_fileSystem.get_full_path(config.CacheLocation), "chocolatey", pkgInfo.Package.Id, pkgInfo.Package.Version.to_string());
this.Log().Debug(() => " Setting up uninstall logging directory at {0}".format_with(logLocation.escape_curly_braces()));
_fileSystem.create_directory_if_not_exists(_fileSystem.get_directory_name(logLocation));
uninstallArgs = uninstallArgs.Replace(InstallTokens.PACKAGE_LOCATION, logLocation);
var packageCacheLocation = _fileSystem.combine_paths(_fileSystem.get_full_path(config.CacheLocation), pkgInfo.Package.Id, pkgInfo.Package.Version.to_string());
this.Log().Debug(() => " Setting up uninstall logging directory at {0}".format_with(packageCacheLocation.escape_curly_braces()));
_fileSystem.create_directory_if_not_exists(_fileSystem.get_directory_name(packageCacheLocation));
uninstallArgs = uninstallArgs.Replace(InstallTokens.PACKAGE_LOCATION, packageCacheLocation);
uninstallArgs = uninstallArgs.Replace(InstallTokens.TEMP_LOCATION, packageCacheLocation);

this.Log().Debug(() => " Args are '{0}'".format_with(uninstallArgs.escape_curly_braces()));

Expand Down

0 comments on commit 72ab767

Please sign in to comment.