Read the file from the embedded FS instead of the real FS
This commit is contained in:
@@ -3,7 +3,6 @@ package main
|
||||
import (
|
||||
"embed"
|
||||
"errors"
|
||||
"gitea.twomorecents.org/Rockingcool/ccat/stack"
|
||||
"io/fs"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@@ -11,6 +10,8 @@ import (
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"gitea.twomorecents.org/Rockingcool/ccat/stack"
|
||||
|
||||
"gopkg.in/yaml.v2"
|
||||
)
|
||||
|
||||
@@ -49,7 +50,7 @@ func generateDefaultConfigs(configOutputPath string) error {
|
||||
relPath, _ := filepath.Rel("config", path)
|
||||
dstPath := filepath.Join(configOutputPath, relPath) // Destination path
|
||||
|
||||
data, err := os.ReadFile(path)
|
||||
data, err := storedConfigs.ReadFile(path)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user