@crievo/omni 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crievo/omni",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "OmniVideo no seu computador: o CLI omni, o studio local e as ferramentas do pipeline.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -54,7 +54,12 @@ export const expandHome = p =>
54
54
  .trim()
55
55
  .replace(/^~(?=\/|$)/, homedir()),
56
56
  );
57
- export const tildify = p => (p.startsWith(homedir()) ? `~${p.slice(homedir().length)}` : p);
57
+ /* on Windows the folder is written `~/…` too (expandHome only expands `~/`), so it reads back the same */
58
+ export const tildify = p => {
59
+ if (!p.startsWith(homedir())) return p;
60
+ const rest = p.slice(homedir().length);
61
+ return `~${process.platform === "win32" ? rest.replace(/\\/g, "/") : rest}`;
62
+ };
58
63
 
59
64
  function readJson(file) {
60
65
  try {