Skip to content

Commit 1e56fd1

Browse files
committed
fix: remove hard code version
1 parent 6f1a307 commit 1e56fd1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

models/initia/run_l1_node.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -728,10 +728,10 @@ func (m *InitializingAppLoading) View() string {
728728
}
729729

730730
// Get binary path based on OS
731-
func getBinaryPath(extractedPath string) string {
731+
func getBinaryPath(extractedPath string, version string) string {
732732
switch runtime.GOOS {
733733
case "linux":
734-
return filepath.Join(extractedPath, "initia_v0.4.10", "initiad")
734+
return filepath.Join(extractedPath, "initia_"+version, "initiad")
735735
case "darwin":
736736
return filepath.Join(extractedPath, "initiad")
737737
default:
@@ -792,7 +792,7 @@ func initializeApp(state *RunL1NodeState) tea.Cmd {
792792
}
793793

794794
extractedPath = filepath.Join(weaveDataPath, fmt.Sprintf("initia@%s", nodeVersion))
795-
binaryPath = getBinaryPath(extractedPath)
795+
binaryPath = getBinaryPath(extractedPath, nodeVersion)
796796

797797
if _, err := os.Stat(binaryPath); os.IsNotExist(err) {
798798
if _, err := os.Stat(extractedPath); os.IsNotExist(err) {

utils/service_manager.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ func GetLinuxRunL1NodeServiceContent(version string) string {
202202
}
203203

204204
weaveDataPath := filepath.Join(userHome, WeaveDataDirectory)
205-
binaryPath := filepath.Join(weaveDataPath, "initia@"+version, "initia_v0.4.10")
205+
binaryPath := filepath.Join(weaveDataPath, "initia@"+version, "initia_"+version)
206206

207207
return fmt.Sprintf(LinuxRunL1NodeTemplate, currentUser.Username, binaryPath)
208208
}

0 commit comments

Comments
 (0)