Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename os_version to os.version #134

Closed
wants to merge 1 commit into from
Closed

Rename os_version to os.version #134

wants to merge 1 commit into from

Conversation

orf
Copy link

@orf orf commented Jun 12, 2023

I believe this should be os.version like ImageConfig?

For example this is what Github container repo returns:

{
  "schemaVersion": 2,
  "manifests": [
    {
      "mediaType": "application/vnd.oci.image.manifest.v1+json",
      "digest": "sha256:b09d1eb75170275f0e465ed97e90718e596aab4a2413ba7eedcfb9f13580aca6",
      "size": 2015,
      "platform": {
        "architecture": "amd64",
        "os": "darwin",
        "os.version": "macOS 13.3"
      },

Also the tests failed on MacOS. I fixed this by canonicalising the temporary directory as well:

thread 'runtime::tests::test_canonicalize_rootfs' panicked at 'assertion failed: `(left == right)`
  left: `"/var/folders/q1/c031nnz57ls4qm4dk3m3w74h0000gn/T/.tmpxAJ0q3/rootfs"`,
 right: `"/private/var/folders/q1/c031nnz57ls4qm4dk3m3w74h0000gn/T/.tmpxAJ0q3/rootfs"`', src/runtime/mod.rs:306:13

Unfortunately std::env::consts::OS returns macos instead of Darwin, so I added an extra arm to the match condition to handle this. This makes Default work properly on MacOS

@@ -260,6 +260,7 @@ impl Spec {
P: AsRef<Path>,
{
Ok(if path.as_ref().is_absolute() {
println!("Other: {}", path.as_ref().display());
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we avoid that print statement?

@orf orf closed this by deleting the head repository Aug 5, 2023
@orf
Copy link
Author

orf commented Apr 13, 2024

Sorry, I forgot about this and deleted my fork. I've re-made it in #163

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.

2 participants