Skip to content

Commit 995060e

Browse files
committed
x
1 parent f7d46e1 commit 995060e

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

.github/workflows/shell-tests.yml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -151,29 +151,29 @@ jobs:
151151
run: |
152152
- name: Find and Extract OpenNLP Distribution
153153
run: |
154-
# Find the first non-src .tar.gz file in the target directory
155-
$TAR_FILE = Get-ChildItem -Path opennlp-distr/target -Filter "*.tar.gz" | Where-Object { $_.Name -notlike "*-src*" } | Select-Object -First 1
156-
157-
# Ensure we found a file
158-
if (-not $TAR_FILE) {
159-
Write-Error "Error: No matching tar.gz file found in opennlp-distr/target"
160-
exit 1
161-
}
162-
163-
# Extract the tar.gz file to the user profile directory
164-
$Destination = "$env:USERPROFILE"
165-
tar -xzf $TAR_FILE.FullName -C $Destination
166-
167-
# Get the directory name of the extracted content (excluding the tar path)
168-
$EXTRACTED_DIR = (tar -tf $TAR_FILE.FullName | Select-Object -First 1).Split('/')[0]
169-
170-
# Set OPENNLP_HOME dynamically in the environment
171-
$OPENNLP_HOME_PATH = "$env:USERPROFILE\$EXTRACTED_DIR"
172-
Write-Host "OPENNLP_HOME=$OPENNLP_HOME_PATH" # Debugging
173-
174-
# Set the environment variable for future steps
175-
echo "OPENNLP_HOME=$OPENNLP_HOME_PATH" >> $GITHUB_ENV
176-
echo "$OPENNLP_HOME_PATH\bin" >> $GITHUB_PATH
154+
# Find the first non-src .tar.gz file in the target directory
155+
$TAR_FILE = Get-ChildItem -Path opennlp-distr/target -Filter "*.tar.gz" | Where-Object { $_.Name -notlike "*-src*" } | Select-Object -First 1
156+
157+
# Ensure we found a file
158+
if (-not $TAR_FILE) {
159+
Write-Error "Error: No matching tar.gz file found in opennlp-distr/target"
160+
exit 1
161+
}
162+
163+
# Extract the tar.gz file to the user profile directory
164+
$Destination = "$env:USERPROFILE"
165+
tar -xzf $TAR_FILE.FullName -C $Destination
166+
167+
# Get the directory name of the extracted content (excluding the tar path)
168+
$EXTRACTED_DIR = (tar -tf $TAR_FILE.FullName | Select-Object -First 1).Split('/')[0]
169+
170+
# Set OPENNLP_HOME dynamically in the environment
171+
$OPENNLP_HOME_PATH = "$env:USERPROFILE\$EXTRACTED_DIR"
172+
Write-Host "OPENNLP_HOME=$OPENNLP_HOME_PATH" # Debugging
173+
174+
# Set the environment variable for future steps
175+
echo "OPENNLP_HOME=$OPENNLP_HOME_PATH" >> $GITHUB_ENV
176+
echo "$OPENNLP_HOME_PATH\bin" >> $GITHUB_PATH
177177

178178
- name: Verify Extraction
179179
run: |

0 commit comments

Comments
 (0)