Merge pull request #6536 from mxpv/runtime-name
Change file name for shim binary path
This commit is contained in:
commit
eb011d127b
@ -129,7 +129,7 @@ func (b *binary) Start(ctx context.Context, opts *types.Any, onClose func()) (_
|
||||
f.Close()
|
||||
}
|
||||
// Save runtime binary path for restore.
|
||||
if err := os.WriteFile(filepath.Join(b.bundle.Path, "runtime"), []byte(b.runtime), 0600); err != nil {
|
||||
if err := os.WriteFile(filepath.Join(b.bundle.Path, "shim-binary-path"), []byte(b.runtime), 0600); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
client := ttrpc.NewClient(conn, ttrpc.WithOnClose(onCloseWithShimLog))
|
||||
|
@ -93,8 +93,8 @@ func (m *ShimManager) loadShims(ctx context.Context) error {
|
||||
runtime string
|
||||
)
|
||||
|
||||
// If we're on 1.6+ and specified custom path to the runtime binary, path will be saved in 'runtime' file.
|
||||
if data, err := os.ReadFile(filepath.Join(bundle.Path, "runtime")); err == nil {
|
||||
// If we're on 1.6+ and specified custom path to the runtime binary, path will be saved in 'shim-binary-path' file.
|
||||
if data, err := os.ReadFile(filepath.Join(bundle.Path, "shim-binary-path")); err == nil {
|
||||
runtime = string(data)
|
||||
} else if err != nil && !os.IsNotExist(err) {
|
||||
log.G(ctx).WithError(err).Error("failed to read `runtime` path from bundle")
|
||||
|
Loading…
Reference in New Issue
Block a user