Merge branch 'development' into development_buildfix
* development: (21 commits) ... chore: Add FsListArg struct and update imports refactor: Rename module and import path refactor: Use snake_case for object names and constants fix: fix conflicts refactor: Improve struct decoding and skip logic .. ... ... ... ... feat: Enhance params parsing and encoding ... test: Add tests for struct encoding and decoding feat: improve build and serialization logic refactor: Improve code structure and logging feat: Improve herolib installation logic in CI refactor: Improve herolib installation script fix: Rename freeflowuniverse to incubaid added fedora for the package install during hero execution ... # Conflicts: # install_herolib.vsh
This commit is contained in:
@@ -42,22 +42,36 @@ fn addtoscript(tofind string, toadd string) ! {
|
||||
os.write_file(rc_file, new_content)!
|
||||
}
|
||||
|
||||
mut org_name := 'freeflowuniverse'
|
||||
|
||||
// Reset symlinks for both possible organizations (cleanup)
|
||||
// Reset symlinks (cleanup)
|
||||
println('Resetting all symlinks...')
|
||||
os.rm('${os.home_dir()}/.vmodules/incubaid/herolib') or {}
|
||||
os.rm('${os.home_dir()}/.vmodules/freeflowuniverse/herolib') or {}
|
||||
os.rm('${os.home_dir()}/.vmodules/${org_name}/herolib') or {}
|
||||
|
||||
// Create necessary directories
|
||||
os.mkdir_all('${os.home_dir()}/.vmodules/${org_name}') or {
|
||||
panic('Failed to create directory ~/.vmodules/${org_name}: ${err}')
|
||||
os.mkdir_all('${os.home_dir()}/.vmodules/incubaid') or {
|
||||
panic('Failed to create directory ~/.vmodules/incubaid: ${err}')
|
||||
}
|
||||
|
||||
// Create new symlinks
|
||||
os.symlink('${abs_dir_of_script}/lib', '${os.home_dir()}/.vmodules/${org_name}/herolib') or {
|
||||
panic('Failed to create herolib symlink: ${err}')
|
||||
abs_dir_of_script := os.dir(@FILE)
|
||||
symlink_target := '${abs_dir_of_script}/lib'
|
||||
symlink_path := '${os.home_dir()}/.vmodules/incubaid/herolib'
|
||||
|
||||
os.symlink(symlink_target, symlink_path) or { panic('Failed to create herolib symlink: ${err}') }
|
||||
|
||||
// Verify the symlink was created
|
||||
// Note: os.exists() may return false for broken symlinks, so we check if it's a link first
|
||||
if os.is_link(symlink_path) {
|
||||
println('✓ Symlink created successfully: ${symlink_path}')
|
||||
println('✓ Points to: ${symlink_target}')
|
||||
// Verify the target exists
|
||||
if os.exists(symlink_target) {
|
||||
println('✓ Target directory exists and is accessible')
|
||||
} else {
|
||||
eprintln('⚠ Warning: Symlink target does not exist: ${symlink_target}')
|
||||
}
|
||||
} else {
|
||||
panic('Failed to create herolib symlink at ${symlink_path}')
|
||||
}
|
||||
|
||||
println('Herolib installation completed successfully!')
|
||||
|
||||
Reference in New Issue
Block a user