Skip to content

Commit c02ca85

Browse files
committed
x
1 parent 995060e commit c02ca85

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

.github/workflows/shell-tests.yml

+12-13
Original file line numberDiff line numberDiff line change
@@ -147,39 +147,38 @@ jobs:
147147
- name: Build with Maven
148148
run: mvn -V clean install --no-transfer-progress -Pci -DskipTests=true
149149

150-
- name: Find and Extract OpenNLP Distribution
151-
run: |
152150
- name: Find and Extract OpenNLP Distribution
153151
run: |
154152
# Find the first non-src .tar.gz file in the target directory
155153
$TAR_FILE = Get-ChildItem -Path opennlp-distr/target -Filter "*.tar.gz" | Where-Object { $_.Name -notlike "*-src*" } | Select-Object -First 1
156-
154+
157155
# Ensure we found a file
158156
if (-not $TAR_FILE) {
159157
Write-Error "Error: No matching tar.gz file found in opennlp-distr/target"
160158
exit 1
161159
}
162-
163-
# Extract the tar.gz file to the user profile directory
164-
$Destination = "$env:USERPROFILE"
160+
161+
# Extract the tar.gz file to the current directory
162+
$Destination = "$(pwd)"
165163
tar -xzf $TAR_FILE.FullName -C $Destination
166-
164+
167165
# Get the directory name of the extracted content (excluding the tar path)
168166
$EXTRACTED_DIR = (tar -tf $TAR_FILE.FullName | Select-Object -First 1).Split('/')[0]
169-
167+
170168
# Set OPENNLP_HOME dynamically in the environment
171-
$OPENNLP_HOME_PATH = "$env:USERPROFILE\$EXTRACTED_DIR"
169+
$OPENNLP_HOME_PATH = "$Destination\$EXTRACTED_DIR"
172170
Write-Host "OPENNLP_HOME=$OPENNLP_HOME_PATH" # Debugging
173-
171+
174172
# Set the environment variable for future steps
175173
echo "OPENNLP_HOME=$OPENNLP_HOME_PATH" >> $GITHUB_ENV
176174
echo "$OPENNLP_HOME_PATH\bin" >> $GITHUB_PATH
175+
177176
178177
- name: Verify Extraction
179178
run: |
180-
# Print the OPENNLP_HOME and check if the 'bin' directory exists
181-
echo "OPENNLP_HOME: $env:OPENNLP_HOME"
182-
dir "$env:OPENNLP_HOME\bin"
179+
# Print the OPENNLP_HOME and check if the 'bin' directory exists
180+
echo "OPENNLP_HOME: $env:OPENNLP_HOME"
181+
dir "$env:OPENNLP_HOME\bin"
183182
184183
- name: Run Pester Tests
185184
run: |

0 commit comments

Comments
 (0)