Skip to content

Commit

Permalink
fix: Infinite Plugin Updates in Development Mode (#1217)
Browse files Browse the repository at this point in the history
* re fix setEnvFile.cjs

* infinit plugin update if in dev mode
  • Loading branch information
error7404 committed Aug 17, 2024
1 parent d06aecb commit 9861f81
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion scripts/setEnvFile.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ fs.readFile(path.join(__dirname, '..', '.env'), 'utf8', (err, existingData) => {
})
.join(os.EOL);

data += os.EOL + existingData;
if (existingEnvData) {
data += os.EOL + existingEnvData;
}

fs.writeFile(path.join(__dirname, '..', '.env'), data, 'utf8', err => {
if (err) {
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/persisted/usePlugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export default function usePlugins() {

const updatePlugin = (plugin: PluginItem) => {
return _update(plugin).then(_plg => {
if (plugin.version === _plg?.version) {
if (plugin.version === _plg?.version && !__DEV__) {
throw new Error('No update found!');
}
if (_plg) {
Expand Down
2 changes: 1 addition & 1 deletion src/screens/browse/components/BrowseTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export const InstalledTab = memo(
</View>
</View>
<View style={{ flex: 1 }} />
{item.hasUpdate ? (
{item.hasUpdate || __DEV__ ? (
<IconButtonV2
name="download-outline"
size={22}
Expand Down

0 comments on commit 9861f81

Please sign in to comment.