Updated msg for Autosize on Linux

This commit is contained in:
dfinke
2019-12-07 10:59:34 -05:00
parent 4608c0bd04
commit 8b5fa9e798

View File

@@ -42,13 +42,18 @@ if (($IsLinux -or $IsMacOS) -or $env:NoAutoSize) {
catch {
$env:NoAutoSize = $true
if ($IsLinux) {
Write-Warning -Message ('ImportExcel Module Cannot Autosize. Please run the following command to install dependencies:' + [environment]::newline +
'"sudo apt-get install -y --no-install-recommends libgdiplus libc6-dev"')
$msg = @"
ImportExcel Module Cannot Autosize. Please run the following command to install dependencies:
apt-get -y update && apt-get install -y --no-install-recommends libgdiplus libc6-dev
"@
Write-Warning -Message $msg
}
if ($IsMacOS) {
Write-Warning -Message ('ImportExcel Module Cannot Autosize. Please run the following command to install dependencies:' + [environment]::newline +
'"brew install mono-libgdiplus"')
}
$msg = @"
ImportExcel Module Cannot Autosize. Please run the following command to install dependencies:
brew install mono-libgdiplus
"@
Write-Warning -Message $msg
}
finally {
$ExcelPackage | Close-ExcelPackage -NoSave