From b0623a06ee3df95f16f34694f11531a276dd6935 Mon Sep 17 00:00:00 2001 From: Maksym Pavlenko Date: Wed, 9 Feb 2022 12:06:55 -0800 Subject: [PATCH] Change file name for shim binary path Signed-off-by: Maksym Pavlenko --- runtime/v2/binary.go | 2 +- runtime/v2/shim_load.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime/v2/binary.go b/runtime/v2/binary.go index 437334913..99e8ab485 100644 --- a/runtime/v2/binary.go +++ b/runtime/v2/binary.go @@ -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)) diff --git a/runtime/v2/shim_load.go b/runtime/v2/shim_load.go index 569cb24a1..afd2dfb4f 100644 --- a/runtime/v2/shim_load.go +++ b/runtime/v2/shim_load.go @@ -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")