Skip to content

Conversation

@Mashimiao
Copy link

Signed-off-by: Ma Shimiao [email protected]

@liangchenye
Copy link
Member

liangchenye commented Jan 17, 2017

LGTM

Approved with PullApprove

}
absPath := filepath.Join(rootfsPath, process.Args[0])
if _, err := os.Stat(absPath); err != nil {
msgs = append(msgs, err.Error())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not finding the binary in the root.path is not necessarily fatal. Perhaps a later mount or pre-start hook or some such was going to provide a binary at the configured path (previous discussion here).

@Mashimiao Mashimiao force-pushed the validate-add-args-check branch from 2a29625 to 3d4dbfe Compare January 17, 2017 08:16
@Mashimiao
Copy link
Author

@wking @liangchenye @mrunalp @hqhq PTAL

absPath := filepath.Join(rootfsPath, process.Args[0])
fileinfo, err := os.Stat(absPath)
if err != nil {
if !os.IsNotExist(err) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: You can flatten this a bit with:

if os.IsNotExist(err) {
  …
} else if err != nil {
  …
} else {
  …
}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine.

Signed-off-by: Ma Shimiao <[email protected]>
@Mashimiao Mashimiao force-pushed the validate-add-args-check branch from 3d4dbfe to 113fd04 Compare January 18, 2017 01:17
@Mashimiao
Copy link
Author

@wking @liangchenye @mrunalp @hqhq PTAL

@wking
Copy link
Contributor

wking commented Jan 18, 2017 via email

@mrunalp
Copy link
Contributor

mrunalp commented Jan 27, 2017

LGTM

Approved with PullApprove

1 similar comment
@hqhq
Copy link
Contributor

hqhq commented Feb 8, 2017

LGTM

Approved with PullApprove

@hqhq hqhq merged commit 671883e into opencontainers:master Feb 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants