Giter VIP home page Giter VIP logo

Comments (5)

bartlomieju avatar bartlomieju commented on August 25, 2024 1

Ref #18218

from deno.

satyarohith avatar satyarohith commented on August 25, 2024

@rnbguy may I know the platform you're encoutering the issue on? The script works fine with Deno 1.44.4 on macOS

➜  24314 deno --version
deno 1.44.4 (release, aarch64-apple-darwin)
v8 12.6.228.9
typescript 5.4.5
➜  24314 cat a.ts
───────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: a.ts
───────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ import * as tar from "npm:[email protected]";
   2   │ import { pipeline } from "node:stream/promises";
   3   │
   4   │ await fetch(
   5   │   "https://github.com/informalsystems/apalache/releases/download/v0.44.11/apalache.tgz",
   6   │ ).then((resp) =>
   7   │   pipeline(
   8   │     resp.body,
   9   │     tar.extract({ cwd: ".", strict: true }),
  10   │   )
  11   │ );
───────┴──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
➜  24314 deno run -A a.ts
➜  24314 ls -lR apalache
total 24
-rw-r--r--  1 sr  staff  11945 May  6 18:07 LICENSE
drwxr-xr-x  3 sr  staff     96 Jun 24 12:10 bin
drwxr-xr-x  3 sr  staff     96 Jun 24 12:10 lib

apalache/bin:
total 8
-rwxr-xr-x  1 sr  staff  1945 May  6 18:07 apalache-mc

apalache/lib:
total 230920
-rw-r--r--  1 sr  staff  104008305 May  6 18:07 apalache.jar

from deno.

rnbguy avatar rnbguy commented on August 25, 2024

I am on Linux.

from deno.

rnbguy avatar rnbguy commented on August 25, 2024

I just realized, this works fine on my personal Arch Linux computer. But fails on docker images. I tried:

  1. alpine, debian, ubuntu tags for denoland/deno image.
  2. archlinux image with pacman -S deno (same setup as my personal computer).

from deno.

rnbguy avatar rnbguy commented on August 25, 2024

It looks like it might be something with root user. The following works fine:

$ docker run --user=deno --workdir=/home/deno denoland/deno:alpine eval '
import * as tar from "npm:[email protected]";
import { pipeline } from "node:stream/promises";

await fetch(
  "https://github.com/informalsystems/apalache/releases/download/v0.44.11/apalache.tgz",
).then((resp) =>
  pipeline(
    resp.body,
    tar.extract({ cwd: ".", strict: true }),
  )
);
'

If you remove --user=deno or --workdir=/home/deno, the command fails.

from deno.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.