Code Monkey home page Code Monkey logo

Comments (11)

rkotze avatar rkotze commented on September 20, 2024 2

I've tried it on MAC OS and works fine. So there is no need to remove the drive letter.
I'll get this fix out soon.

from git-mob-vs-code.

rkotze avatar rkotze commented on September 20, 2024

Interesting, I specifically remove the drive letter to make ti work on Windows

I think the difference being you run the portable VS code version. I wonder if that has anything to do with it.
I'll try to find time to investigate it.

from git-mob-vs-code.

rkotze avatar rkotze commented on September 20, 2024

@r15ch13 I've setup Git Mob on a portable version of VS Code and was able to open the .git-coauthors file.

Were you able to follow the path in the error message to the file? I'm just wondering if the path is incorrect somehow?

By chance are you using the environment variable GITMOB_COAUTHORS_PATH?

from git-mob-vs-code.

r15ch13 avatar r15ch13 commented on September 20, 2024

The path itself is correct, except the missing drive letter. GITMOB_COAUTHORS_PATH is not set.

It works just fine if I remove .replace(/^([a-z]:[\\]|[\/])/gi, "") from

return this.rawPath.replace(/^([a-z]:[\\]|[\/])/gi, "");

from git-mob-vs-code.

r15ch13 avatar r15ch13 commented on September 20, 2024

Example output:
image

  get path() {

    vscode.window.showErrorMessage("without regex: " + path.join(os.homedir(), this.file));
    vscode.window.showErrorMessage("with regex: " + path.join(os.homedir(), this.file).replace(/^([a-z]:[\\]|[\/])/gi, ""));

    return path
      .join(os.homedir(), this.file);
  }

from git-mob-vs-code.

rkotze avatar rkotze commented on September 20, 2024

Interesting, I'm on windows 10 and used the latest version of git-mob, git-mob-vs-code and VS Code.

The only thing I don't know is what version of VS Code do you have?

As far as I understand Portable VS Code, it does not auto-update. Maybe that version does not support file paths in the same way as the latest.

from git-mob-vs-code.

r15ch13 avatar r15ch13 commented on September 20, 2024

image

Installed via Scoop to D:\scoop\apps\vscode-portable\current

from git-mob-vs-code.

rkotze avatar rkotze commented on September 20, 2024

I see, the issue could be that is looking for .git-coauthors on your D drive but it's on your C drive.

This is easy to fix for windows, just need to think about Unix based systems.

from git-mob-vs-code.

r15ch13 avatar r15ch13 commented on September 20, 2024

Shouldn't be os.homedir() enough? The directory separators are correct in both cases.

const os = require('os')
const path = require('path')

console.log(path.join(os.homedir(), '.git-coauthors'))

image
Test in Ubuntu WSL

from git-mob-vs-code.

rkotze avatar rkotze commented on September 20, 2024

I remember the issue was on a Mac. So I'll need to confirm the path on a Mac.

When I first did this, I thought os.homedir() was the solution.

from git-mob-vs-code.

rkotze avatar rkotze commented on September 20, 2024

Will be part of release 1.3

from git-mob-vs-code.

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.