rCore-Tutorial-v3 icon indicating copy to clipboard operation
rCore-Tutorial-v3 copied to clipboard

fix(Makefile)-fix-mount-errors-in-windows

Open SARDONYX-sard opened this issue 3 years ago • 0 comments
trafficstars

If you feel this is unnecessary, please close this pull request. :)

  • In PowerShell, the pwd command does not accept the current path string in the same way as bash. Therefore, this pull request uses ifeq in the Makefile to branch the command.

There are several possible options for the command.

(Option1) alias pwd -> Get-Location and considering the profile override maybe we should use Get-Location instead of pwd

PWD_CMD := powershell -NoProfile -Command "Write-Output $$(Get-Location)"

(Option2) Instead of PowerShell, we may want to use the following command.

PWD_CMD := cmd /c "echo %CD%"

(Another option) Differences in this kind of shell can be left to docker. Using docker-compose.yml

version: "3.9"

services:
  app:
    build:
      context: ./ # Dockerfile/URL Path
      dockerfile: Dockerfile
    image: dinghao188/rcore-tutorial:dev # as image name
    tty: true # == `docker -t`
    stdin_open: true # == `docker -i`
    volumes:
      - ./:/mnt/

2022-08-25 (2)

2022-08-25 (1)

SARDONYX-sard avatar Aug 25 '22 09:08 SARDONYX-sard