Skip to content

Commit 06d3df5

Browse files
feat: Auto-installing fontforge in workflow ( Fixes #1 )
1 parent 225e240 commit 06d3df5

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Font.psm1

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,15 @@ if ($home) {
2929
$script:this = $myModule
3030

3131
#region Custom
32+
$fontForge = $ExecutionContext.SessionState.InvokeCommand.GetCommand('fontforge','application')
33+
if (-not $fontForge) {
34+
if ($env:GITHUB_EVENT_PATH) {
35+
sudo apt-get install fontforge -y | Out-Host
36+
$fontForge = $ExecutionContext.SessionState.InvokeCommand.GetCommand('fontforge','application')
37+
} else {
38+
Write-Warning "FontForge is not installed and in the path. Import/Export-Font will not work"
39+
}
40+
}
3241
#endregion Custom
3342

3443
Export-ModuleMember -Alias * -Function * -Variable $myModule.Name

0 commit comments

Comments
 (0)